amazon ec2 - SSH tunnel stops working after EC2 instance restart -


i have ssh tunnel ec2 instance (say a) elastic ip (say b). worked perfectly. yet, b had failure. had stop it, , start new instance same elastic ip. , exact same ssh tunnel not work anymore. yet:

  • i can still ssh b. know keys in place
  • i tried exact same tunnel instance a, , works expected.

so somehow, if detected problem when b went down, , blocking traffic.

tunnel:

/usr/bin/ssh -o stricthostkeychecking=no -i /path_to/id_dsa -f -p 22 -n -l 26:www.foo.com:80 ssh_tunnel@amazon_public_ip 

and when try curl here get:

    curl -v -h "host: www.foo.com" http://localhost:26/foofoo * hostname not found in dns cache *   trying 127.0.0.1... * connect 127.0.0.1 port 26 failed: connection refused * failed connect localhost port 26: connection refused * closing connection 0 curl: (7) failed connect localhost port 26: connection refused 

am missing something?

i found issue. did not pay attention, when ssh-ing instance, getting warning message: warning: remote host identification has changed!. since worked anyway, thought not problem. turns out makes tunnel fail.

so removed offending rsa key known_hosts , works.


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -