Re: shell ssh over a ssh tunnel



On 2006-09-19, Sylvain Ferriol <sferriol@xxxxxxx> wrote:
i have a ssh tunnel available between internet/intranet network. but i
can not login the gateway. only forward is available.
how can i open a shell on a sshd server inside intranet throw the ssh
gateway.

ssh -N -L 22:sshd_intranet:22 sshd_gateway
it do not work, ssh localhost returns:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

You have a preexisting entry for localhost in the known_hosts file.

Try:
ssh -o HostKeyAlias=sshd_intranet localhost

If it works then put a host entry for it into your ~/.ssh/config file, eg

Host sshd_intranet
Hostname localhost
HostKeyAlias sshd_intranet
CheckHostIP no

Failing that you could check out the NoHostAuthenticationForLocalhost
option in ssh_config(5), but HostKeyAlias is the better solution.

--
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

  • Re: ssh client hangs when default route is set
    ... ]2) the default route is set and the target host is up ... ]ssh does not work (in my LAN and even to localhost) when ... ]3) the default route is set and the target host is down. ...
    (comp.security.ssh)
  • Re: Tunneling to a third host
    ... my linux box (host) at work does not have a open port to the internet but ... another linux box (gateway) on our network does. ... and then from that terminal ssh into mine. ... what i want to do is forward port from client through gateway to host so i ...
    (comp.security.ssh)
  • Re: need help setting up ssh on D3/Linux
    ... If you have the Linux firewall running on the D3/Linux host then you will need to enable port 22. ... Since you can ssh localhost, it seems that the sshd service is running. ... The router points to the gateway box, which contains no data or applications and has very limited users/logins. ...
    (comp.databases.pick)
  • Re: localhost
    ... >> MJT, tried SSH and could not get past the password, have no idea what it ... > Connection to localhost closed. ... The authenticity of host 'localhost ' can't be established. ...
    (alt.os.linux.suse)
  • 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)