In order to transfer files via WinSCP using root account,
1) Go to Environment -> SCP / Shell
2) Choose "sudo su -" in the field "Shell"
System shows error: "Connection has been unexpectedly closed. Server sent command exit status 1.
Error skipping startup message. Your shell is probably incompatible with application (BASH is recommended)
In WinSCP log..
. 2013-04-04 19:21:56.661 Started a shell/command
. 2013-04-04 19:21:56.665 --------------------------------------------------------------------------
. 2013-04-04 19:21:56.665 Using SCP protocol.
. 2013-04-04 19:21:56.667 Doing startup conversation with host.
. 2013-04-04 19:21:56.672 Skipping host startup message (if any).
> 2013-04-04 19:21:56.672 echo "WinSCP: this is end-of-file:0"
! 2013-04-04 19:21:56.699 sudo: sorry, you must have a tty to run sudo
. 2013-04-04 19:21:56.699 Server sent command exit status 1
. 2013-04-04 19:21:56.700 Disconnected: All channels closed
* 2013-04-04 19:21:56.713 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 1.
* 2013-04-04 19:21:56.713 Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
Login to AWS Linux Server
1) Run command visudo using root account
2) Search the line "Defaults requiretty" and add "Defaults:ec2-user !requiretty" right after it.
After the setup, you can SCP to the server.
沒有留言:
張貼留言