Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-15-2005, 12:45 AM   #1
Registered: Nov 2005
Location: nagpur
Posts: 33

Rep: Reputation: 15
Question scp command problem

hello there,
i have a small network at my own and that work very fine. here I am able to ssh from one machine to other and also able to get the login prompt of other machine through ssh. but problem is that when i fire "scp" command then it shows an error "no route to host"
Why it is so?????
Can you give any solution to work fine.....
Thank you regards......

Last edited by srnerkar1; 11-15-2005 at 07:58 AM.
Old 11-15-2005, 06:37 PM   #2
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
why don't you post your ssh command and your scp command. The only thing I can think of that you might be doing is using a port besides 22. in which case the port switch is different for scp -P instead of -p or something like that.
Old 11-15-2005, 11:12 PM   #3
Registered: Nov 2005
Location: nagpur
Posts: 33

Original Poster
Rep: Reputation: 15
posted ssh command here

hello thanks for ur reply....
here I am having server and client Now i want to copy file "/root/example.txt" from server to client and for that i am giving command from client "scp /setup " So is this command wrong?????? because after firing command it shows messege "no route to host" but I am able to do ssh succesefully from client to server with command "ssh root@" So what would be the problem......

Thanks for ur valuable time..............
Old 11-16-2005, 05:03 AM   #4
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68

Do you use scp before ssh? Try login at first and scp then.
Old 11-16-2005, 06:34 AM   #5
Registered: Nov 2005
Location: nagpur
Posts: 33

Original Poster
Rep: Reputation: 15
also tried the same

thanks to reply again,
sir I also tried that also. I first logged with ssh on and i get prompt of server now from server's prompt i typed the same command but in reverse manner as follows "scp /root/". But still shows same error that "no route to host"
.................any solution????
Old 11-16-2005, 07:26 AM   #6
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
Can you use an account besides root? I'm wondering if there is some security setting someplace getting in the way. Yes, I know you can ssh in as root (a bad idea by the way) but scp may be tripping over something else.
Old 11-16-2005, 07:44 AM   #7
LQ Newbie
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
You should try
scp /root/ root@
rather than
scp /root/
Hope it helps
Old 11-16-2005, 08:06 AM   #8
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
I think that cguilbot is correct. The problem is in the use of scp command, not on the hosts themselves.
The "rule" is scp sourceath_to_file destination, so in you case it would be :
root@ /home/<your_home_directory>/path_to_sub-dir/example.txt
Now, typically, root is not allowed to log in "over the wire" for obvious security reasons, so you may want to use a regular user for this log in or add the regular user to the sudoes file if the worst comes to worst.

Hope this helps.



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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
scp command zchoyt Linux - General 10 04-02-2014 07:47 AM
Include scp password in command cli_man Linux - General 1 08-05-2005 03:47 PM
command of scp Paxmaster Linux - General 4 01-06-2005 12:59 PM
error with scp command eduac Linux - Security 2 08-07-2003 04:50 PM
scp command in OpenSSH howto filsed Linux - Networking 10 05-31-2002 03:33 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:18 PM.

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