作者filiaslayers (司马云)
看板Linux
标题[问题] ssh加上Nf参数如何搭配expect?
时间Tue Feb 3 23:50:19 2015
我的expect档案长这样
#!/usr/bin/expect
set timeout 30
spawn ssh mysite
expect "Password:"
send "pass"
interact
如果ssh没加Nf参数是没问题,但加了一输入完密码就断线了
请问该怎麽改写呢?google了很久找不到有人有跟我一样的问题
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 220.132.147.49
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1422978622.A.9F5.html
1F:→ kenduest: 建议用 sshpass 程式就可以了... 比较 okay 02/04 00:15
我试试看,感谢
※ 编辑: filiaslayers (218.161.95.118), 02/04/2015 09:29:15
2F:推 goldie: sshpass +1 02/05 22:07