LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why can't I 'scp' from remote to local host? (https://www.linuxquestions.org/questions/linux-newbie-8/why-cant-i-scp-from-remote-to-local-host-883714/)

Nukeman 05-31-2011 08:28 AM

Why can't I 'scp' from remote to local host?
 
I am having difficulty sending files from a remote machine to local one using
Code:

scp
. It is working the other way however. local > remote. I am using the verbose options
Code:

scp -v /directory/file local@192.168.X.X:/directory/file
and I am getting this output:

Code:

Executing: program /usr/bin/ssh host 192.168.X.X, user ----, command scp -v -t -- /directory
OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.X.X [192.168.X.X] port 22.
debug1: connect to address 192.168.X.X port 22: Connection refused
ssh: connect to host 192.168.X.X port 22: Connection refused
lost connection

I wonder why this is? I have Googled my face off and read countless man pages and I am seriously stuck. If anybody could help that would great. Thanks.

markush 05-31-2011 08:41 AM

Hello Nukeman, welcome to LQ,
Quote:

Originally Posted by Nukeman (Post 4371886)
...
Code:

Executing: program /usr/bin/ssh host 192.168.X.X, user ----, command scp -v -t -- /directory
OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.X.X [192.168.X.X] port 22.
debug1: connect to address 192.168.X.X port 22: Connection refused
ssh: connect to host 192.168.X.X port 22: Connection refused
lost connection

...

I think you didn't configure ssh properly, so the connection is refused. You should read in the Ubuntu-documentation about how to configure ssh properly, look for example here: http://manpages.ubuntu.com/manpages/..._config.5.html

Markus

druuna 05-31-2011 08:43 AM

Hi,

Code:

scp -v /directory/file local@192.168.X.X:/directory/file
Is the name of the user local?

You can use:
Code:

scp /dir/file 192.168.1.1:/dir/file
or
Code:

scp /dir/file user@192.168.1.1:/dir/file
The first example assumes that the remote user is the same as the local user, the second one sets the specific user.

Hope thishelps.

Nukeman 05-31-2011 11:22 AM

WOW! I figured it out i didn't install ssh onto my local desktop enviornment


All times are GMT -5. The time now is 04:24 PM.