随笔-204  评论-90  文章-8  trackbacks-0
#!/usr/bin/expect
####################
set pass xxxx
set user yyyy
####################
spawn ssh -p 35000 -o StrictHostKeyChecking=no "${user}@xgrelay.xxxx.com"
expect {
  -re ".*Dkey.*" { gets stdin dkey; send "$dkey\r"; exp_continue}
  -re "Option>:"  { send "1\r" ;}
  -re "Password>:" { send "$pass\r" ; exp_continue }
  -re "password:" { send "$pass\r" ; exp_continue }
}
posted on 2021-01-18 11:35 一凡 阅读(158) 评论(0)  编辑  收藏 所属分类: linux

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问  
 
<2021年1月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿(9)

随笔分类

随笔档案

文章分类

文章档案

相册

学习资源

搜索

  •  

最新评论

阅读排行榜

评论排行榜