LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   SCP exec request failed on channel 0 lost connection (https://www.linuxquestions.org/questions/linux-general-1/scp-exec-request-failed-on-channel-0-lost-connection-4175447978/)

SalientAnimal 01-31-2013 06:47 AM

SCP exec request failed on channel 0 lost connection
 
Hi All,

I have created a script that is meant to SCP my files from an Ubuntu Server to a Windows 2003 Server. When running the SCP * username@host I get the following error message:

Code:

exec request failed on channel 0
lost connection

However I am able to manually log into the Windows Server using SFTP and I am then also able to "put" the files into the directory as required.

Any advice or direction you guys can give me will be appreciated.

I'm using freeSSHd, Ubuntu and Windows Server 2003.

chrism01 01-31-2013 06:40 PM

Check the ssh service on MSWin; maybe its set to only allow sftp see http://www.openbsd.org/cgi-bin/man.c...nfig&sektion=5 and look for subsystem, internal-sftp, and see http://www.openbsd.org/cgi-bin/man.c...penBSD+Current

SalientAnimal 02-01-2013 02:37 AM

I seem to really be having a lot of trouble with this one. So I've decided to just connect using sftp and then to "put" the files.

Problem now though is I need to password to be authenticated as well as I want to automate this process.

Here is part of my script that I will use, not sure if this is correct:
Code:

MOVE_OFF_SERVER ()
{
  sftp username@10.10.10.10
  cd destination_directory
  put *
  echo $?
}



All times are GMT -5. The time now is 07:35 AM.