Ubuntu: How to make a custom command available in sftp


There are only few commands available in sftp environment. Is it possible to make available any custom command in sftp.

For example any other executable (that is not available by default), or any shell script or alias.


You're treating SFTP and SSH as if they're the same.
That's your problem here; they aren't the same.

SFTP is very deliberately locked down for handling files and nothing else.

The only way I can imagine doing what you suggest is by replacing /usr/lib/openssh/sftp-server with something else that does support a remote command syntax. I don't know any drop-in replacements that will. You would also need a client that knew what to do... This is asking a lot.

I'd suggest using SSH (if you have access) when you need to fire commands off. It can also do some limited file moving but that's really not what it's for.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »