내 Windows 랩톱에서 Unix 상자 (주니퍼 라우터)로 파일을 보내려고합니다.Windows에서 Python으로 유닉스까지 sftp
작은 스크립트를 작성했지만 원격 경로가 잘못되었다고 말합니다. 나는 오류가
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'
나는 바보입니다. 고마워요 –
적어도 한 번은 일어나야합니까? :) – sarnold