LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-27-2011, 03:46 PM   #1
musammil123
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: Disabled
SCP command is not working properly due to SSH enabled


Hi
My Question is I have installed the ssh key authentication in Server A. User can connect this using key file via SSH. without authentication user can't connect this system via SSH. Now I am trying to copy the file from Server B through SCP command. But it is not working. While I am trying use this command from Server B I am getting below error "ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection timed out lost connection".
xxx.xxx.xxx.xxx is Server A. SSH is enabled in both server A,B.

Please let me know why SCP command is not working?


Thanks
Mohamed
 
Old 05-27-2011, 04:57 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Can you please let us know what syntax you are using for scp?

scp -vrp /root/filename root@xxx.xxx.xxx.xxx:/root/

Where,

The first one is the source path and the path after root@xxx.xxx.xxx.xxx:/ is the destination path (on remote server) where you want to copy the file.

Also it will be good if you can check if your iptables rule if they are allowing SSH connection on the destination server. If possible give a try to iptables -F, this will flush iptables rules though.

You can also try adding the following line in iptables file:


iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Just out of curiosity which OS are you using.
 
  


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
SSH not working after ssh-keygen due to lack of entropy grob115 Linux - Security 8 08-28-2010 12:33 PM
SCP is not working properly ! blackhat_hk Linux - General 1 08-01-2010 09:33 AM
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 03:23 AM
How to use EXPECT command to scp or ssh? thefountainhead100 Linux - Software 6 03-28-2008 07:41 PM
How do I know that my swap is enabled and working properly? mouse46 Linux - Software 9 10-26-2004 08:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:17 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