Why chdir command doesn't work with client.get_transport() ?
charles_hans at yahoo.com
Sun Feb 3 18:58:59 CET 2008
Thank you, Martin! I think that you are right.
But I can't use rsh since I am on XP to send commands to UNIX. I used telnet
before. Now I am converting to ssh/sftp, which is my purpose.
I put some more efforts in the following code:
t = paramiko.Transport((hostname, port))
t.connect(username=username, password=password, hostkey=None)
sftp = t.open_sftp_client()
pwd = sftp.getcwd() # Successful
s = t.open_session()
stdout = s.makefile('rb')
for line in stdout:
print '... ' + line.strip('\n') # Find: the default
This means the channel s created above has nothing to do with the sftp
client which successfully changed the pwd. Any idea that we can link s and
sftp together? Thanks!
I can't find something equivalent to Telnet in paramiko.
View this message in context: http://www.nabble.com/Why-chdir-command-doesn%27t-work-with-client.get_transport%28%29---tp15248798p15256088.html
Sent from the Python - python-list mailing list archive at Nabble.com.
More information about the Python-list