在此目录下新建iterm2ssh.sh文件
sudo vi /usr/local/bin/iterm2ssh.sh
#!/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 $argv 3]\n"}
}
interact
:wq 保存退出
添加权限
chmod a+x ./iterm2ssh.sh
在Send text at start 中输入 iterm2ssh.sh 22(端口) 账号 服务器地址 密码
本文地址:https://blog.csdn.net/sunlihuo/article/details/107331762
如对本文有疑问, 点击进行留言回复!!
现在微服务这么火,你还不了解吗?阿里P8推荐的微服务学习指南
论文笔记:SlowFast Networks for Video Recognition
网友评论