You are not logged in.
Hello.
I'm outside of my home LAN (I'm at work) and am trying to ssh into a pc within it. I can use nmap to see that the port 22 is open and I can telnet to port 22. When I try to ssh there the command just hangs until I stop the process with Ctrl C. I've looked the wiki https://wiki.archlinux.org/index.php/Secure_Shell but don't see anything there to address this in particular. This functionality has been working for the past couple of years and I suspect some update changed things somehow. I'm not at home now to troubleshoot the pc running sshd but will do so when I'm able. Do you have any suggestions for what I can try to troubleshoot this?
Thanks
Bill.
Last edited by billbrown (2014-07-08 13:39:53)
Offline
Honestly, this could be any number of issues. Your best bet is to check the server logs when you get home. Maybe try running scp or sftp and see if those work?
Offline
Add "-vvv" to the ssh command to get diagnostics about what is happening. Also, and I know this does not address your question specifically, I find it best to forward port 443 on your WAN facing home router to port 22 on your home pc. Then when you are at work you "ssh -p 443" to your home box. This is much less likely to get blocked by any corporate firewall which your work may have in place.
Offline
No luck so far. I reinstalled openssh and restarted and reenabled the sshd service. This time I as least get a prompt for my password. When adding the -v option above I get the following output (I took out my ip address):
$ ssh -v bill@my.host
OpenSSH_6.6.1, OpenSSL 1.0.1h 5 Jun 2014
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to my.host [myip] port 22.
debug1: Connection established.
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_rsa type 1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_rsa-cert type -1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_dsa type -1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_dsa-cert type -1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_ecdsa type -1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_ecdsa-cert type -1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_ed25519 type -1
debug1: identity file /cygdrive/c/Users/bill/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA <server host key>
debug1: Host 'my.host' is known and matches the ECDSA host key.
debug1: Found key in /cygdrive/c/Users/bill/.ssh/known_hosts:22
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /cygdrive/c/Users/bill/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /cygdrive/c/Users/bill/.ssh/id_dsa
debug1: Trying private key: /cygdrive/c/Users/bill/.ssh/id_ecdsa
debug1: Trying private key: /cygdrive/c/Users/bill/.ssh/id_ed25519
debug1: Next authentication method: password
bill@my.host's password:
debug1: Authentication succeeded (password).
Authenticated to my.host ([my.ip]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
...hanging...
Write failed: Connection reset by peer
$
the hanging "Entering interactive session." search lead me to this forum post: https://bbs.archlinux.org/viewtopic.php?id=152619 where this issue is not yet marked SOLVED. I haven't tried using the server keys instead of the password prompt yet. I'll try that later this evening. Do the -v comments shed anymore light of what might be the issue? Thanks again.
Offline
I'm marking this SOLVED.
For me I reinstalled openssh and then disabled and stopped sshd.socket and then started and enabled sshd. Mabye that will work for others in this situation.
Offline