MXOXW

Life always finds a way.

ssh自动登录

| Comments

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/expect -f

set port 22
set user XXX
set host XXX
set password XXX
set timeout -1

spawn ssh $user@$host
expect "*assword:*"

send "$password\r"
interact

评论