-   Linux - Newbie (
-   -   Host key verification failed (

brownie_cookie 03-29-2011 07:38 AM

Host key verification failed
Hi all

I know that there are multiple threads with problems like this, but still i didn't found my answer.

The situation is like this:
I have a local server and a remote server, i did a ssh key swap so i can log on to the remote server with no problems (automatically logging on, no need to enter pass or login).
I've made a script that copies (with SCP) a file FROM the REMOTE server TO the LOCAL server (NOT FROM the LOCAL server to the REMOTE server !!!!), and then i get an error like:

Host key verification failed.
A detail you might need to know:
- i can still log on from the LOCAL to the REMOTE server (with no need to fill in login and pass) -> through a script or with the command line (ssh user@host)

Does anyone know the answer for this?


kbp 03-29-2011 07:47 AM

Is your script logging in to the remote server as you or a different account? Also, it's not important which way you're copying files, only which end you're executing the script on

ssh into remote host then:
scp /path/to/file user@<local_host>:/local/directory

or on local host:
scp user@<remote_host>:/path/to/file /local/directory

Which example matches what you're doing ?

brownie_cookie 03-29-2011 07:56 AM

first i copy the script from the local to the remote with SCP
then this script is been executed and gives a result (which he puts in a file on the remote server)
then that file must be copied back to the local server

so FIRST i do:
scp /path/to/file user@<REMOTE_HOST>:/REMOTE/directory

then i do:
scp user@<remote_host>:/path/to/file /local/directory

(notice the words in bold are changed of what you said, i don't say it's wrong but i just want you to know what i've used compared to what you suggested)

All times are GMT -5. The time now is 12:49 PM.