代码如下:
#!/usr/bin/expect
set user root
set host yourip
set password yourpass
spawn ssh $user@$host
set timeout 20
expect "*assword:*"
set timeout 20
send "$password\r"
expect "root@vultr:"
send "ssserver -c /etc/shadowsocks.json\r"
interact
expect eof
相关文章:
-
2021-11-01
-
2021-06-25
-
2021-12-18
-
2022-12-23
-
2021-06-15
-
2021-05-01
-
2021-09-15
猜你喜欢
-
2021-12-20
-
2021-10-31
-
2021-11-29
-
2021-11-24
-
2021-08-27
-
2021-09-26
相关资源
-
下载
2023-01-29
-
下载
2023-02-23
-
下载
2022-12-24