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

Notices


Reply
  Search this Thread
Old 11-15-2005, 12:45 AM   #1
srnerkar1
Member
 
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 ..........best regards......

Last edited by srnerkar1; 11-15-2005 at 07:58 AM.
 
Old 11-15-2005, 06:37 PM   #2
uopjohnson
Member
 
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
srnerkar1
Member
 
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 192.168.0.111 and client 192.168.0.2.... Now i want to copy file "/root/example.txt" from server to client and for that i am giving command from client "scp 192.168.0.111:/root/example.com /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@192.168.0.111" So what would be the problem......


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

Rep: Reputation: 68
Smile

Do you use scp before ssh? Try login at first and scp then.
 
Old 11-16-2005, 06:34 AM   #5
srnerkar1
Member
 
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 192.168.0.111 and i get prompt of server now from server's prompt i typed the same command but in reverse manner as follows "scp /root/example.com 192.168.0.2:/setup". But still shows same error that "no route to host"
.................any solution????
 
Old 11-16-2005, 07:26 AM   #6
Hangdog42
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
cguilbot
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
You should try
scp /root/example.com root@192.168.0.2:/setup
rather than
scp /root/example.com 192.168.0.2:/setup
Hope it helps
 
Old 11-16-2005, 08:06 AM   #8
ralvez
Member
 
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@192.168.0.111:example.txt /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.

Rick
 
  


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 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration