SFTP: Specify subsystem in ssh_config file?

0

1

I'm trying to connect to an SFTP server, and then run sudo to change users before running the SFTP server process. On the command-line, I can do this with:

sftp -s "sudo -u <sftp_user> /usr/libexec/openssh/sftp-server" <host>

But! I'd like to be able to do this from my .ssh/config file, so I can make this connection using Transmit, which does not allow specifying a custom SFTP subsystem in its connection configuration.

Are there any tricks using LocalCommand or ProxyCommand that could make this work?

Why aren't we using SSH keys to connect directly as <sftp_user>?

We're using sudo with group memberships for access control. If we used authorized_keys to let people directly connect as sftp_user we would somehow need to keep that list of keys up to date, which would be ugly.

Nate

Posted 2019-11-06T19:22:47.177

Reputation: 173

The -s switch does not have an equivalent in ssh_config. LocalCommand is not relevant to this imo. And I do not think that ProxyCommand would help either. – Martin Prikryl – 2019-11-06T20:08:12.420

No answers