#!/usr/bin/expect -f
spawn ssh root@your server ip
expect "*password:"
send "your server password \r"
expect "*#"
interact
#!/usr/bin/expect -f
spawn ssh root@your server ip
expect "*password:"
send "your server password \r"
expect "*#"
interact