
ftp> help
Commands may be abbreviated Commands are:
! delete literal prompt send
debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdirsshconnect(hostname='xxxx', port=22, username='root', password='56789')
这行代码就是远程连接B服务器。hostname、port、username、password都是需要远程登录服务器的信息(即1010015200、22、root、56789)
连接成功之后,sshexec_command(cmd) 这里的cmd是你想要执行的命令(ls)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)