Advertisement
Guest User

Untitled

a guest
Feb 4th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. t = paramiko.Transport(('192.168.56.102', 22))
  2. t.connect(username='vagrant', password='vagrant')
  3. chan = t.open_session()
  4. chan.get_pty()
  5. chan.invoke_subsystem('sftp')
  6. chan.exec_command('sudo su')
  7. sftp = paramiko.SFTPClient.from_transport(t)
  8.  
  9. paramiko.ssh_exception.SSHException: Channel closed.
  10. DEBUG:paramiko.transport:EOF in transport thread
  11.  
  12. chan.exec_command('sudo su -c /bin/sftp-server')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement