import paramiko,os
conn = paramiko.Transport(('192.000.1.000', 22))
conn.connect(username='root', password='123456789')
sftp = paramiko.SFTPClient.from_transport(conn)
remote_path='/a.txt'
local_path='/a.txt'
sftp.put(local_path,remote_path)
import paramiko,os
conn = paramiko.Transport(('192.000.1.000', 22))
conn.connect(username='root', password='123456789')
sftp = paramiko.SFTPClient.from_transport(conn)
remote_path='/a.txt'
local_path='/a.txt'
sftp.put(local_path,remote_path)
本文标题:连接远程服务器不用密码
本文链接:https://www.haomeiwen.com/subject/bjvalctx.html
网友评论