我想从我的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