<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">run tcpdump on your server when you do the outside connect.</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">you can</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">tcpdump -i eth0 -n |grep 209.122.208.175</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">do you don't get a tonne of crap. You may have to change eth0 to what is appropriate.</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">also see if you have any iptables odd rules, or any odd routing.</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">-tl</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 12, 2015 at 11:22 PM, Dev Guy <span dir="ltr"><<a href="mailto:devguy.ca@gmail.com" target="_blank">devguy.ca@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi All,<br><br>I am having a real nagging problem with ssh. I setup dynamic dns so I could I connect to my box from outside. <br><br>My basic setup is a router connected to a cable modem.<br></div><div>I've opened the firewall port 22 tcp/udp on my router.<br></div><div><br>However he is the problem I am having.<br><br></div><div>I can ssh into my box from inside my LAN like, ssh 192.168.0.100, works fine!<br><br></div><div>However when I try to ssh using my dynamic dns (or the external IP), ssh will hang and never return.<br><br></div><div>1) I've tried running my sshd in debug mode and here is the output<br></div><div>=====(SERVER SIDE)=====<br><br></div><div>debug1: sshd version OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014<br>debug1: key_parse_private2: missing begin marker<br>debug1: read PEM private key done: type RSA<br>debug1: private host key: #0 type 1 RSA<br>debug1: key_parse_private2: missing begin marker<br>debug1: read PEM private key done: type DSA<br>debug1: private host key: #1 type 2 DSA<br>debug1: key_parse_private2: missing begin marker<br>debug1: read PEM private key done: type ECDSA<br>debug1: private host key: #2 type 3 ECDSA<br>debug1: private host key: #3 type 4 ED25519<br>debug1: rexec_argv[0]='/usr/sbin/sshd'<br>debug1: rexec_argv[1]='-d'<br>Set /proc/self/oom_score_adj from 0 to -1000<br>debug1: Bind to port 22 on 0.0.0.0.<br>Server listening on 0.0.0.0 port 22.<br>debug1: Bind to port 22 on ::.<br>Server listening on :: port 22.<br>debug1: Server will not fork when running in debugging mode.<br>debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8<br>debug1: inetd sockets after dupping: 3, 3<br>Connection from 192.168.0.1 port 48996 on 192.168.0.100 port 22<br><br><br></div><div>2) Here is the ssh verbose output<br>=====(CLIENT SIDE)=====<br><br>OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014<br>debug1: Reading configuration data /etc/ssh/ssh_config<br>debug1: /etc/ssh/ssh_config line 19: Applying options for *<br>debug2: ssh_connect: needpriv 0<br>debug1: Connecting to <a href="http://yadav.duckdns.org" target="_blank">yadav.duckdns.org</a> [209.122.208.175] port 22.<br>debug1: Connection established.<br>debug3: Incorrect RSA1 identifier<br>debug3: Could not load "/home/yadav/.ssh/id_rsa" as a RSA1 public key<br>debug1: identity file /home/yadav/.ssh/id_rsa type 1<br>debug1: identity file /home/yadav/.ssh/id_rsa-cert type -1<br>debug1: identity file /home/yadav/.ssh/id_dsa type -1<br>debug1: identity file /home/yadav/.ssh/id_dsa-cert type -1<br>debug1: identity file /home/yadav/.ssh/id_ecdsa type -1<br>debug1: identity file /home/yadav/.ssh/id_ecdsa-cert type -1<br>debug1: identity file /home/yadav/.ssh/id_ed25519 type -1<br>debug1: identity file /home/yadav/.ssh/id_ed25519-cert type -1<br>debug1: Enabling compatibility mode for protocol 2.0<br>debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-8<br><br></div><div>As you can see from the server output the connection gets established, but then the hang happens and I can't figure out what's going on?<br><br></div><div>Someone suggested that sshd might be trying to do a reverse lookup and to add, <br><br>'UseDNS no' <br><br>to /etc/ssh/sshd_config and restarting the daemon. This didn't work!<br><br></div><div>Any ideas? I can't seem to find anything for my particular problem on the Internet.<br></div></div>
<br>---<br>
Talk Mailing List<br>
<a href="mailto:talk@gtalug.org">talk@gtalug.org</a><br>
<a href="http://gtalug.org/mailman/listinfo/talk" target="_blank">http://gtalug.org/mailman/listinfo/talk</a><br>
<br></blockquote></div><br></div>