icetee / remote-ftp

FTP/FTPS/SFTP client for Atom.io
MIT License
555 stars 102 forks source link

feature: specify remote shell / login command #495

Open thorstenhirsch opened 8 years ago

thorstenhirsch commented 8 years ago

Tools like WinSCP offer an option to specify the remote shell being used. This can also be used to configure an initial login command like "sudo su - someuser". Why not connecting as someuser in the first place? Well, we've got enterprise environments where the login user differs from the user that is allowed to work on files. So everybody needs to sudo su - user before he can start with his actual work. Putty allows to specify such a command, too.

jimmaaay commented 8 years ago

So in short are you looking to have something that would allow the execution of a command everytime you connect to the server?

thorstenhirsch commented 8 years ago

Yes. I wanted to give some context, so that you know that this command can involve switching the user. Thus file synchronization might not be trivial. I don't know.

Am 11.10.2016 5:29 nachm. schrieb "jimmaaay" notifications@github.com:

So in short are you looking to have something that would allow the execution of a command everytime you connect to the server?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mgrenier/remote-ftp/issues/495#issuecomment-252952011, or mute the thread https://github.com/notifications/unsubscribe-auth/AAl03cSthtyRSAGX0qHJAmySPtCepqDxks5qy6tEgaJpZM4KSp8V .

jimmaaay commented 8 years ago

As long as the server supports ssh commands should be doable

ityreh commented 7 years ago

Any news on this request? I have the same problem here, switching the user by sudo su - techuser if I want to edit some files outside of my home. If I could tell remote-ftp to execute this command right after the login it would be great! :+1:

grenierdev commented 6 years ago

Hi guys, been a while since I've posted in here.

I've been working on a project that has it's roots in remote-ftp : file system abstraction. A client of mine had needs to access SFTP under sudo like MobaXterm using SCP protocol (which support SUDO).

SFTP protocol does not support any method to achieve this. However, you can emulate SFTP command with SSH command prefixed with sudo -s or sudo -i -u jimmy, like I did here.