-3

I tried to copy data from the remote computer to my computer by using this command:

-bash-4.1$ scp gouda@csopt5:/home/gouda/bin/fort.20 home/gouda/Desktop

but I got this message and I couldn't copy my file fort.20.
how to solve this problem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for csopt5 has changed,
and the key for the corresponding IP address 172.17.4.15
is unchanged. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Offending key for IP in /etc/ssh/ssh_known_hosts:4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
1b:a0:e7:43:0d:98:a6:42:01:52:9b:af:f9:d6:08:1c.
Please contact your system administrator.
Add correct host key in /home/gouda/.ssh/known_hosts to get rid of this message.
Offending key in /home/gouda/.ssh/known_hosts:3
RSA host key for csopt5 has changed and you have requested strict checking.
Host key verification failed.
5
  • The second warning already has some good explanations on unix.stackexchange.com/questions/183943/… Commented Aug 9, 2016 at 8:20
  • I tried your advice but i got the same above warning when I tried to do copy by scp ; gouda@tm24j:~$ ssh-keygen -R 172.17.4.11 /home/gouda/.ssh/known_hosts updated. Original contents retained as /home/gouda/.ssh/known_hosts.old Commented Aug 9, 2016 at 8:27
  • Please edit your question to show what steps you have tried, and in what order. Did both sections of the warning still appear? (The ssh-keygen -R changed your personal ~/.ssh/known_hosts, not the global /etc/ssh/ssh_known_hosts that caused the first warning.) Commented Aug 9, 2016 at 8:34
  • Please also describe the type of network where this happens (eg. your own home network with an access point, college/department network) - that may give a clue as to why csopt5's IP address could have changed, and whether there's anything you can do about it. Commented Aug 9, 2016 at 8:49
  • First warning most probably from some motd [ linux.die.net/man/5/motd ] similar utility. The second warning can be solved using simple sed command below:: sed -i 3d /home/gouda/.ssh/known_hosts where 3 is the line mentioned in the error message. Commented Jan 23, 2017 at 5:31

2 Answers 2

0

My error come from trying to copy from inside the folder. I must use scp from outside the file not from inside. Thanks to all people effort.

1
  • That's the alternate way, you will get the same error on your next try. the permanent solution is given below. empty the file or remove the ip or the hostname line from the file ./ssh/known_host which will resolve the error. Commented Aug 11, 2016 at 3:55
-2
  1. Go to /home/yourusername/.ssh/
  2. Open the 'known_hosts' file clear whats there
  3. Save the file
  4. Retry the ssh command
  5. ???
  6. Profit
6
  • cat /dev/null > ~/.ssh/known_hosts equivalent to your answer Commented Aug 9, 2016 at 9:47
  • echo "" > ~/.ssh/known_hosts equivalent to your answer Commented Aug 9, 2016 at 9:51
  • whatever, just edit your answer to contain particular commands he should use Commented Aug 9, 2016 at 9:53
  • well now we should move this post to the NaCl section Commented Aug 9, 2016 at 9:57
  • 3
    This is taking care of the symptom, not the cause. It's equivalent of piping the error stream to /dev/null "to make the warnings go away". Commented Aug 9, 2016 at 9:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.