在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。