#!/bin/sh
ftp -n<<END_FTP
open 192.168.1.4
user codfei duibuqi //用户名codfei 密码duibuqi
binary
prompt off //关闭提示
mput test //上传test
close
bye
END_FTP
自动ssh 登陆 从A 到B 然后再到c
#!/usr/bin/expect -f
set timeout 30
spawn ssh codfei@B
expect "password:"
send "pppppp\r"
expect "]*"
send "ssh codfei@C\r"
expect "password:"
send "pppppp\r"
interact