在Ubuntu上设置SecureCRT自动登录,主要有以下两种安全的方法:
ssh-keygen -t rsa -b 4096,按提示操作生成私钥和公钥。ssh-copy-id user@remote_host,替换为实际用户名和服务器地址。sudo apt-get install expect。auto_login.exp,内容示例为#!/usr/bin/expect -f set timeout 20 set username [lindex $argv 0] set password [lindex $argv 1] set host [lindex $argv 2] spawn ssh $username@$host expect "assword:" send "$password\r" interact,替换为实际信息。chmod +x auto_login.exp。