Re: pysftp / paramiko problem

2019-06-14 Thread Robin Becker
... I tried an experiment with a remote server that I control and pysftp works perfectly there. A difference that I know of is that this server is using ubuntu 18.04 and we don't use passwords, but a private_key. Also this server is using the openssh internal sftp. I believe the failing se

Re: pysftp / paramiko problem

2019-06-14 Thread Robin Becker
On 13/06/2019 18:23, MRAB wrote: . What does: sftp.normalize('.') return? It returns '/'. sftp.chdir('') and that also fails in paramiko as it seems to use CMD_REALPATH to do that. File "tsftp.py", line 7, in main print(sftp.chdir('')) File "/home/rptlab/tmp/tpy3

Re: pysftp / paramiko problem

2019-06-13 Thread MRAB
On 2019-06-13 14:57, Robin Becker wrote: On 13/06/2019 05:56, dieter wrote: Robin Becker writes: On 12/06/2019 05:59, dieter wrote: Robin Becker writes: I am trying to convert older code that uses ftplib as the endpoint has switched to sftp only. ... Well with real sftp I can cd to that p

Re: pysftp / paramiko problem

2019-06-13 Thread Robin Becker
On 13/06/2019 05:56, dieter wrote: Robin Becker writes: On 12/06/2019 05:59, dieter wrote: Robin Becker writes: I am trying to convert older code that uses ftplib as the endpoint has switched to sftp only. ... Well with real sftp I can cd to that path so if it is a symlink it goes somewhe

Re: pysftp / paramiko problem

2019-06-12 Thread dieter
Robin Becker writes: > On 12/06/2019 05:59, dieter wrote: >> Robin Becker writes: >>> I am trying to convert older code that uses ftplib as the endpoint has >>> switched to sftp only. > ... > Well with real sftp I can cd to that path so if it is a symlink it goes > somewhere. > > With pysftp I

Re: pysftp / paramiko problem

2019-06-12 Thread Robin Becker
On 12/06/2019 05:59, dieter wrote: Robin Becker writes: I am trying to convert older code that uses ftplib as the endpoint has switched to sftp only. I am using the pysftp wrapper around paramiko. The following script fails def main(): import pysftp with pysftp.Connection('ftp.rem

Re: pysftp / paramiko problem

2019-06-11 Thread dieter
Robin Becker writes: > I am trying to convert older code that uses ftplib as the endpoint has > switched to sftp only. > > I am using the pysftp wrapper around paramiko. > > The following script fails > > def main(): > import pysftp > with pysftp.Connection('ftp.remote.com', username='me'

pysftp / paramiko problem

2019-06-11 Thread Robin Becker
I am trying to convert older code that uses ftplib as the endpoint has switched to sftp only. I am using the pysftp wrapper around paramiko. The following script fails def main(): import pysftp with pysftp.Connection('ftp.remote.com', username='me', password='xx') as sftp: