SecureCRT在Linux中进行远程命令执行的标准流程
确保已安装SecureCRT客户端(Windows/Mac均可),且Linux服务器已开启SSH服务(默认端口22)、防火墙允许SSH连接(如iptables/firewalld放行22端口)。
Ctrl+N),弹出「新建会话向导」。192.168.1.100);root或普通用户)。.ppk或.pem格式),无需手动输入密码。[root@localhost ~]#或[user@hostname ~]$),表示已成功连接。ls查看当前目录文件、cd /tmp切换至/tmp目录、mkdir test创建test目录、reboot重启服务器),按回车键执行。ls -l # 列出当前目录详细信息
df -h # 查看磁盘空间使用情况
systemctl status nginx # 检查Nginx服务状态
echo 'Hello, Linux!';echo "当前时间是:date"(显示当前时间);ps aux | grep nginx(查找nginx相关进程)。mypassword),点击「确定」。下次双击会话将自动登录(注意:此方式存在密码泄露风险,建议仅在测试环境使用)。id_rsa.ppk);id_rsa.pub内容)复制到Linux服务器的~/.ssh/authorized_keys文件中(若文件不存在,可创建),并设置权限chmod 600 ~/.ssh/authorized_keys;Ctrl+Shift+C复制、Ctrl+Shift+V粘贴)。/etc/ssh/sshd_config文件中设置PasswordAuthentication no,重启SSH服务(systemctl restart sshd)以禁用密码登录,防止暴力破解。iptables)或/etc/ssh/sshd_config中的AllowUsers指令,限制仅特定IP地址可访问SSH服务。