Unable to log in to the server using the password-free script
Semoz opened this issue · comments
When logging in with a password-free script, how can I use this tool?
I've tried adding 'trzsz' before SSH, but I cannot access the server
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"}
"Password:"
{send "[lindex $argv 3]\n"}
}
interact
You can try https://github.com/trzsz/trzsz-ssh. Document: https://trzsz.github.io/ssh
It works for me:
spawn trzsz ssh -p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2]
Is there any error? Or any information?