Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Confusing issue with scp - Host Key Authentication Failed

67 views
Skip to first unread message

Dayton Jones

unread,
Mar 3, 2006, 9:30:53 PM3/3/06
to
I can ssh from host1 to host2 with no problems. I can scp from host1 to
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

unread,
Mar 3, 2006, 11:15:19 PM3/3/06
to
>>>>> "DJ" == Dayton Jones <tko...@comcast.net> writes:

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.

--
Richard Silverman
r...@qoxp.net

0 new messages