Last active
March 8, 2020 13:46
-
-
Save leonGravel/2225bfbed9fca9c3f4123aa230b8afd4 to your computer and use it in GitHub Desktop.
Connect to the server remotely
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set user root | |
set host xxx.36.xxx.142 | |
set password xxxxxxxx | |
set timeout -1 | |
spawn ssh $user@$host | |
expect "*assword:*" | |
send "$password\r" | |
interact | |
expect eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment