LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Host key verification failed (http://www.linuxquestions.org/questions/linux-newbie-8/host-key-verification-failed-871685/)

brownie_cookie 03-29-2011 06: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:
Code:

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?

Thx

kbp 03-29-2011 06: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

e.g
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 06: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:59 PM.