Re: SCP via SSH tunnel works, then not, then works again

From: Darren Tucker (dtucker_at_gate.dodgy.net.au)
Date: 08/24/05


Date: 24 Aug 2005 14:32:45 GMT

On 2005-08-23, elwinter <elwinter@verizon.net> wrote:
> I am using SSH to perform local port forwarding from my local machine
> (L) to a remote machine (RA) behind a firewall at a remote site
> (legitimately :^)). The port forwarding is done through an account
> (gwaccount) on a gateway machine (GW).
[...]
> scp -P 2222 gwaccount@localhost:remote_filename local_filename
> This works to remote host RA without a problem.

Add "-o HostKeyAlias=RA" to this.

[...]

> 5. Finally, when I try to copy the same file from host RB:
> scp -P 2222 gwaccount@localhost:remote_filename local_filename

Add "-o HostKeyAlias=RB" to this.

> the command fails, and I get error messages about the remote host
> identification changing, and referring me to item 2 in the local
> known_hosts file, which is 'localhost'.

As far as ssh is concerned, "localhost:2222" is the same host both times
and it gets rather upset when it sees the host key has changed.

> Any help would be greatly appreciated. And I'll gladly help you with
> any physics/astronomy homework in return :^).

I'll keep this in mind should I ever study either physics or astronomy :-)

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


Relevant Pages

  • ssh / keyless login problem
    ... OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f ... I am using rsync to backup my local host to a remote host over ssh. ... The first time the script runs after a long delay (ie overnight when the local ...
    (SSH)
  • RE: sshd / ssh setup
    ... We have an Remote FreeBSD system which is located some where on the ... This method gives the maximum protection possible utilizing ssh. ... Host setup steps. ... Reboot your system to activate sshd and login as root. ...
    (freebsd-questions)
  • SSH filter transer, was Re: Soft Update - directory/file listing
    ... But SSH file transfer is painfully slow all the time. ... ## SSH 3.2 Server Configuration File ... # Note that forwardings using the name of this host will be allowed (if ...
    (freebsd-performance)
  • Re: port forwarding with binding to specific IP on remote host
    ... I want to establish an SSH tunnel. ... the SSH connection has two IP addresses that may be used ... local host has IP 10.0.0.1 ... the connection from my client host to the remote host ...
    (comp.security.ssh)
  • Re: [opensuse] Re: OpenSUSE PuTTY ?
    ... PuTTY lets you set up all kinds of special options, tied to which host ... The ssh daemon on the host machine is usually activated by default, ... As a taster to open a remote session in a new window in any konsole ... Windows users should explore Cygwin as this will allow you to run ssh ...
    (SuSE)