Problem by copying files with SCP
I will copy all the files include the directories from one server to another.
I login to server as user inet: Code:
[inet@s003ap18 ~] Now I begin to copy all the directories and all the files under the directories with: Code:
scp -r inet@s003ap10:/opt/jboss/INET/ ./ Code:
ssh_exchange_identification: Connection closed by remote host |
add a -v to the scp command and also check the /var/log/secure and /var/log/messages files on the server side. Sounds like you have RSA / DSA keys installed which aren't working maybe.
|
Quote:
Code:
[root@s003ap18 ~]# scp -v inet@s003ap10:/opt/jboss/INET/.bash_history ./ |
Looks like it's not configured for password authentication, again, check the serverside logs. can you ssh into the server?
|
I can't ssh to the server. I got
Code:
ssh_exchange_identification: Connection closed by remote host |
your remote server (where you want to copy the stuffs)
#ssh 172.23.53.10 |
Thomas, you just edited your previous post where you mentioned the problem was solved. Why do you want to edit your post and ask the question again?
scp works on ssh so if you can not ssh into your machine you would not be able to scp the files to remote machine. And if you have configured ssh for passwordless authentication, then you need public keys to be stored in .ssh folder in the home folder of the user. |
Quote:
|
Right, so it's rsa keys or it's not configured to use password authentication. have you checked the serverside logs? if your keys are misconfigured, try adding -O RSAAuthentication=no to prevent using it.
|
Ok. So you need to first make sure you can ssh to the machine you want to copy the files to (destination machine) using scp.
Once you are successful in establishing the ssh connection, you can try scp. Oops...Chris came in here first. |
I solved the problem now. I add the ip of the local server to the /etc/hosts.allow in remote server.
|
All times are GMT -5. The time now is 09:15 PM. |