Can't get sudo su - userid to work
I have run around and around with the different options in the FAQs and forum posts. None of them fit my situation closely enough for me to adapt.
If I use PuTTY, I log in with a ppk RSA key file. Then I use
So, for the SFTP setting, there is a sample that reads like
There is a popular link on StackOverflow that shows:
I thought it might be a formatting problem, so I created a script with just
in it and it worked to connect as my normal user. If I added the
then it just hangs
So my question is: Can I do the equivalent of
If I use PuTTY, I log in with a ppk RSA key file. Then I use
sudo su - userid
to change to the higher privileged user. When I do that command, I do NOT have to enter a password.
So, for the SFTP setting, there is a sample that reads like
su -c /bin/sftp-server
so that's missing the userid and the sudo
.
There is a popular link on StackOverflow that shows:
sudo su -c /usr/lib/sftp-server
which is still missing the userid.
I thought it might be a formatting problem, so I created a script with just
/usr/lib/sftp-server
sudo
line like this:
sudo su - userid /usr/lib/sftp-server
So my question is: Can I do the equivalent of
sudo su - userid
and then launch sftp-server
?