Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ssh auto login script
#!/usr/bin/expect -f
set port you_port
set user you_user
set host you_ip
set password you_pass
set timeout -1
spawn ssh -nNTf -D $port $user@$host
expect "*assword:*"
send "$password\r"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment