Hello all,
I recently have tried it out and I can say it works great as intended. Thank you. I will also say that my previous post of it not working when I tried it on other programs I was just doing it incorrectly.
I have some ideas/feedback thus far:
At my work we have different linux OS’s where the sftp-server lives.
Example the difference between OEL and Ubuntu
OEL
sudo su -c /usr/libexec/openssh/sftp-server
Ubuntu
sudo su -c /usr/lib/openssh/sftp-server
I have to change the custom command for each different OS to make it work. However looking into how WinSCP does it and other sftp things, on most linux OS’s there lives a file called sshd_config in /etc/ssh/ at that tells the system where the default sftp-server like so:
override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
This is how the setting “Default” in WinSCP knows where to look for that executable.
From their website in more details:
SFTP Requirements
For SFTP, the only requirement beyond the server requirements above is to run SFTP on the server. It is best to run it as an SSH-2 subsystem. If you select SFTP-only on the Login dialog and the SFTP subsystem is not found, WinSCP will try to find the SFTP server in some common directories (/usr/lib/sftp-server, /usr/local/lib/sftp-server, etc.). This way, it is possible to use SFTP even with SSH-1, which does not support subsystems.
I have tried running something like this in Royal Custom Command:
sudo su -c ‘grep sftp-server /etc/ssh/sshd_config | awk “{print $3}”’
But I think I have the syntax wrong anyways, (Any ideas to make it work like I intend?), and Royal doesn’t like it. Regardless can we figure out a way to implement something like this along with it? In my use case I would always try to go to root like in my attempt above.
Sorry this got long, but I hope I got the point across.