-
paramiko
《使用python的paramiko模块实现ssh与scp功能》
client = SSHClient() client.load_system_host_keys() client.connect('ssh.example.com') stdin, stdout, stderr = client.exec_command('ls -l')
paramiko里没有一个模块叫scp,对应的是paramiko.sftp_client.SFTP(sock),其方法:
-
get(remotepath, localpath, callback=None)
从远程获取到本地
-
put(localpath, remotepath, callback=None, confirm=True)
从本地上传到远程
-
初识paramiko||在Python中使用ssh||scp
猜你喜欢
转载自blog.csdn.net/The_Time_Runner/article/details/108555616
今日推荐
周排行