1

In WinSCP is an option to edit the SFTP server command/path (in the protocol options):

winscp image

Is there also such an option in pysftp/Paramiko or in an another SFTP package for Python?

Thanks!

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
JP371
  • 15
  • 3

1 Answers1

1

What that option in WinSCP does is that it runs SFTP over the "exec" channel, instead of the "sftp subsystem" channel. An (untested) equivalent in Python Paramiko:

ssh = paramiko.SSHClient()

# authenticate here

chan = ssh.get_transport().open_session()
chan.exec_command("/path/to/sftp-server")
sftp = paramiko.SFTPClient(chan)
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992