@charlwillia6: It does not have to be SCP. It works for SFTP too, but the settings are different. Please read the FAQ:
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
sudo chown -Rf ec2-user /var/www/mysite/location
sudo chmod -Rf 755 /var/www/mysite/location
echo -e "MyUserName ALL=(ALL) NOPASSWD: /usr/libexec/openssh/sftp-server" > /etc/sudoers.d/winscp
/bin/bash -c "sudo -s"
webdevadded to the
webdev ALL = NOPASSWD : ALL
/var/lib/mysql. After some tinkering with the settings I figured out that for Debian and Ubuntu, I have to open the Login > Advanced window, navigate to the SFTP tree item and type
sudo /usr/lib/openssh/sftp-serverin the SFTP server box. This allowed me to use my non-root credentials to gain root access.
sudofrom terminal. You need to specify it as "Shell" for the session. Please read the FAQ again.
. 2006-09-25 12:28:05.843 Startup conversation with host finished.
. 2006-09-25 12:28:17.000 Executing user defined command.
> 2006-09-25 12:28:17.000 sudo su ; echo "WinSCP: this is end-of-file:$?"
. 2006-09-25 12:28:32.001 Waiting for data timed out, asking user what to do.
. 2006-09-25 12:28:32.001 Asking user:
. 2006-09-25 12:28:32.001 Host has not answered for 15 seconds.
. 2006-09-25 12:28:32.001
. 2006-09-25 12:28:32.001 Wait for another 15 seconds? Pressing 'Abort' button will close session. ()
. 2006-09-25 12:28:38.361 Attempt to close connection due to fatal exception:
* 2006-09-25 12:28:38.361 Terminated by user.
. 2006-09-25 12:28:38.361 Closing connection.
* 2006-09-25 12:28:38.361 (ESshFatal) Terminated by user.
sudoerslooks like so:
myusername ALL=NOPASSWD: ALL
/bin/bash -c 'sudo su -'as "Remote command" (on SSH tab)? Would it connect automatically without any prompt? Or post a log file.
/etc/sudoersand added in the user account as it suggested and now I can do an
sudo suand it switches me to root with no prompting for password. But I still can't get it to work within WinSCP. It just times out.