LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-31-2013, 06:47 AM   #1
SalientAnimal
LQ Newbie
 
Registered: Nov 2012
Posts: 8

Rep: Reputation: Disabled
Question 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.
 
Old 01-31-2013, 06:40 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
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
 
Old 02-01-2013, 02:37 AM   #3
SalientAnimal
LQ Newbie
 
Registered: Nov 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
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 $?
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH: X11 forwarding request failed on channel 0 273 Linux - Software 22 07-31-2014 11:45 AM
bash: scp: command not found \ lost connection maccas17 Linux - Server 4 06-04-2012 03:47 AM
[SOLVED] PTY allocation request failed on channel 0 sycamorex Slackware 1 01-30-2011 05:55 AM
PTY allocation request failed on channel 0 nice88 Linux - Server 4 12-14-2010 05:44 PM
After copying 6 GB, scp fails (lost connection) augustosup Red Hat 2 01-26-2007 11:10 AM


All times are GMT -5. The time now is 11:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration