我想從我的Windows筆記本電腦sftp文件到Unix盒(瞻博網絡路由器)。sftp從Windows到Python與Python
我寫了一個小腳本,但它說我有遠程路徑錯誤。我知道有可能是看中的東西我需要添加這樣的窗口可以翻譯尼克斯目錄,但我不能找到它在谷歌:(
這裏是腳本:
import paramiko
host = "192.168.1.87"
port = 22
transport = paramiko.Transport((host, port))
password = "juniper123"
username = "root"
transport.connect(username = username, password = password)
sftp = paramiko.SFTPClient.from_transport(transport)
filepath = '/balls/test.txt'
localpath = 'C:\Users\python1\test.txt'
sftp.put(filepath, localpath)
sftp.close()
transport.close()
我得到的錯誤:
WindowsError: [Error 3] The system cannot find the path specified: '/balls/test.txt'
我是個白癡。謝謝 – 2012-02-21 02:18:20
必須至少發生一次,對吧? :) – sarnold 2012-02-21 02:20:48