iTerm2远程链接服务器

Mac配置ITerm2

  • 一键登录远程服务器
    • 1.直接连接服务器
    • 2.使用堡垒机连接服务器
  • 安装并使用 rz 和 sz
    • 1.配置rz、sz
    • 2.配置item2
    • 3.解决使用expect脚本登陆服务器rz失效

一键登录远程服务器

1.直接连接服务器

创建 except 脚本

#!/usr/bin/expect

set timeout 30
spawn ssh -p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2]
expect {
   
        "(yes/no)?"
        {
   send "yes\n";exp_continue}
        "password:"
        {
   send "[lindex 

你可能感兴趣的:(TOOLS,ssh)