Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82207
| From | "Luuk" <luuk@1:249/999.remove-cdt-this> |
|---|---|
| Subject | Re: why can't download file from linux server into local window disk c: |
| Message-ID | <54866F2E.1745.complang@piz.noip.com> (permalink) |
| Newsgroups | comp.lang.python |
| References | <54866F2E.1744.complang@piz.noip.com> |
| Date | 2014-12-09 11:32 -0500 |
| Organization | Unlimited download news at news.astraweb.com |
To: pengsir On 9-12-2014 09:14, pengsir wrote: > > > My vps ip is x.y.z.w ,i want to download /etc/passwd from linux server > into my local window disk c: . > > import paramiko > host = "x.y.z.w" > port = 22 > transport = paramiko.Transport((host, port)) > password = "mykey" > username = "root" > transport.connect(username = username, password = password) > sftp = paramiko.SFTPClient.from_transport(transport) > filepath = '/etc/passwd' > localpath = 'c:' > sftp.get(filepath, localpath) > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "D:\Python34\lib\site-packages\paramiko\sftp_client.py", line > 719, in get > > with open(localpath, 'wb') as fl: > PermissionError: [Errno 13] Permission denied: 'c:' You, 'root', does not have enoug permission to do it.... C:\temp>\util\Putty\pscp root@opensuse:/etc/passwd . Using keyboard-interactive authentication. Password: Access denied --- SoupGate-Win32 v1.05 * Origin: <SpaceSST.BBS.Fidonet<>NNTP.gateway.@.piz.noip.me> (1:249/999) --- Synchronet 3.15b-Win32 NewsLink 1.92 SpaceSST BBS Usenet <> Fidonet Gateway
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
why can't download file from linux server into local window disk c:? "pengsir" <pengsir@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500 Re: why can't download file from linux server into local window disk c: "Luuk" <luuk@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500 Re: why can't download file from linux server into local window disk c: "Thomas Rachel" <thomas.rachel@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500 Re: why can't download file from linux server into local window disk c: "Nobody" <nobody@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
csiph-web