I was using scp and ssh suddenly some warning about
SOMETHING NAST!
man-in-the-middle attack
From that moment when that warning appeared till now, I can copy files via sftp but it is impossible to use scp. What's going on? I tried removing .ssh/known_hosts but it is always the same. When scp myfile user@server:/Folder
, I get the following message.
scp: /Folder: Permission denied
Best Answer
first, this is a security issue.
Here is a nice review article:
http://www.symantec.com/connect/articles/ssh-host-key-protection
Basically ssh servers (openssh-server) use keys to identify themselves and prevent others from mimicking them. A "man in the middle" might, for example, capture your user name and password.
You can fix it via several methods, I prefer
Before you do that, however, you should check with the server sys admin to see if the (server) keys were changed.
For your scp error, you need to use the full path. My guess would be: