Robert Vangel wrote: > belahcene wrote: > >I want to send a file from one remote machine to another one like this > >scp [EMAIL PROTECTED]:/home2/dsl-1.2.iso [EMAIL PROTECTED]:/debian > >Password: > >Host key verification failed. > >lost connection > > You need to make sure 172.19.5.75 already has an entry in > ~/.ssh/known_hosts for 172.19.130.149
Or alternatively that the existing entry is correct. In my case it automatically adds new hosts to that file. But if a host key changes this will fail. Seeing "Host key verification failed" makes me think this is the root of the problem. The OP might not be aware that the copy is point to point. That is, the effect is as if you logged into the source machine and ran scp straight from there to the destination machine. It does not go through the host you launched the command from. I think someone else posted this: ssh -tA [EMAIL PROTECTED] scp /home2/dsl-1.2.iso [EMAIL PROTECTED]:/debian The -t creates a pty for the connection so that you will get all interactive behavior. The -A forwards your ssh-agent connection, assuming you have an agent running and if not then you should. > Also in terms of authentication, its as if 172.19.5.75 is doing it, not > you. Wherever you are is only authenticating to 172.19.5.75. > > You will need to see about generating a key on 172.19.5.75 and putting > the public key in the ~/.ssh/authorized_keys file on 172.19.5.75 Full agreement. But forwarding the ssh-agent might also play into this too. I would verify that ssh-agent is set up correctly and use agent forwarding, assuming I could trust both of those hosts. Bob
signature.asc
Description: Digital signature