Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Dayton Jones
March 4, 2006, 2:30 am
rate this thread
host2 with no problems. But when I try to scp "host2:/path/to/file
host2:/path/to/new/file" I get "Host Key Authentication failed.
Since I can ssh to the host, I know keys are correct so why do I get the
failure? What do I need to set/check to resolve this issue?
Thanks in advance.
- Richard E. Silverman
March 4, 2006, 4:15 am
Re: Confusing issue with scp - Host Key Authentication Failed
DJ> I can ssh from host1 to host2 with no problems. I can scp from
DJ> host1 to host2 with no problems. But when I try to scp
DJ> "host2:/path/to/file host2:/path/to/new/file" I get "Host Key
DJ> Authentication failed.
DJ> Since I can ssh to the host, I know keys are correct so why do I
DJ> get the failure?
The are correct on host1, but not on host2. The problem is how scp works
when copying from one remote host to another (scp does not notice the fact
that in this case, both remote hosts are the same). This command:
$ scp foo:file1 bar:file2
results in this command being run behind the scenes:
ssh foo scp file1 bar:file2
which in turn runs this on foo:
ssh bar scp -t ...
So, your account on foo must also be able to "ssh bar" with no problem.
DJ> What do I need to set/check to resolve this issue?
Adjust foo:~/.ssh/known_hosts accordingly.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum