Export to GitHub

pysftp - issue #4

No remove method and execute fails on many windows hosts running various sshd's.


Posted on Jun 20, 2012 by Grumpy Elephant

What steps will reproduce the problem? 1. connect to a windows host running an SSH daemon. 2. issue srv.execute('ls') 3.

What is the expected output? What do you see instead? I see an exception

paramiko.SSHException: Channel closed.

What version of the product are you using? On what operating system? Ubuntu package pysftp-0.2.2-py2.6.egg

Please provide any additional information below. I added the following to implement remove, but still get the same error.

Sorry I have never written patches.

def rmfiles(self, path): """remove file at given path""" self._sftp_connect() self._sftp.remove(path)

Comment #1

Posted on Nov 2, 2012 by Quick Wombat

On some SFTP hosts I use, any execute command I run returns: ['/sbin/nologin: No such file or directory\n'] All of the other pysftp commands work properly.

sftp.execute('ls') ['/sbin/nologin: No such file or directory\n']

Comment #2

Posted on May 10, 2014 by Grumpy Monkey

that is due to security settings on the remote server. sftp is not a real user a/k/a /sbin/nologin

Comment #3

Posted on May 10, 2014 by Grumpy Monkey

migrated issue to bitbucket

https://bitbucket.org/dundeemt/pysftp/issue/11/add-a-rm-method

Status: Duplicate

Labels:
Type-Defect Priority-Medium