Problem logging in over GRE/IPSec tunnel?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hello, 

First time posting here, but I’ve been using OpenBSD for since 2.7 or so. I hope this is the right place to ask. 

Anyway, I’m running into a puzzler. 

I have an OpenBSD 5.5 system in a data center and a second OpenBSD 5.5 router at my apartment. I set up a GRE over IPSec tunnel from my apartment’s private subnet to the data center internal subnet as per the instructions on the gre(4) man page. I can connect to other systems inside the private subnet at the data center via SSH with no problem. 

If I connect via SSH to an external address of the router (which does not pass through the tunnel), everything functions as expected. I double-checked that this connection does not go through the tunnel by sniffing traffic on enc0. 

If I connect via SSH to the internal address of the router (through the tunnel, confirmed by tcpdump on enc0), the connection fails with the error message on the client system: 

> Read from socket failed: Connection reset by peer

When I use -vvv on the connection attempt, the log looks like: 

> Paul-Suh-Core-i5:~ plsuh$ ssh -vvv locadmin@192.168.140.251
> OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
> debug1: Reading configuration data /etc/ssh_config
> debug1: /etc/ssh_config line 20: Applying options for *
> debug1: /etc/ssh_config line 53: Applying options for *
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to 192.168.140.251 [192.168.140.251] port 22.
> debug1: Connection established.
> debug3: Incorrect RSA1 identifier
> debug3: Could not load "/Users/plsuh/.ssh/id_rsa" as a RSA1 public key
> debug1: identity file /Users/plsuh/.ssh/id_rsa type 1
> debug1: identity file /Users/plsuh/.ssh/id_rsa-cert type -1
> debug3: Incorrect RSA1 identifier
> debug3: Could not load "/Users/plsuh/.ssh/id_dsa" as a RSA1 public key
> debug1: identity file /Users/plsuh/.ssh/id_dsa type 2
> debug1: identity file /Users/plsuh/.ssh/id_dsa-cert type -1
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_6.2
> debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
> debug1: match: OpenSSH_6.6.1 pat OpenSSH*
> debug2: fd 3 setting O_NONBLOCK
> debug3: load_hostkeys: loading entries for host "192.168.140.251" from file "/Users/plsuh/.ssh/known_hosts"
> debug2: key_type_from_name: unknown key type 'ecdsa-sha2-nistp256'
> debug3: key_read: missing keytype
> debug3: load_hostkeys: loaded 0 keys
> debug1: SSH2_MSG_KEXINIT sent
> Read from socket failed: Connection reset by peer
> Paul-Suh-Core-i5:~ plsuh$ ssh -vvv locadmin@192.168.140.1

On the server, I get this line in /var/log/authlog:

> Oct 19 22:42:17 ravelin sshd[5880]: fatal: Read from socket failed: Connection reset by peer [preauth]


I tried moving aside the ~/.ssh/known_hosts file, but the behavior is the same. In the debug trace the line "debug2: key_type_from_name: unknown key type 'ecdsa-sha2-nistp256'“ is missing, but other than that nothing changed. 

I don’t understand how connecting to the same system, to the same sshd instance -- one way works, the other doesn’t. Client is OS X 10.9.5, OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011. 

Any ideas? 


—Paul


FYI - the debug trace from a successful connection 

> Paul-Suh-Core-i5:~ plsuh$ ssh -vvv -p 2022 locadmin@xxxxxxxxxxxxxxxxxxxxxxxx
> OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
> debug1: Reading configuration data /etc/ssh_config
> debug1: /etc/ssh_config line 20: Applying options for *
> debug1: /etc/ssh_config line 53: Applying options for *
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to ravelin-ext.goodeast.com [209.190.244.103] port 2022.
> debug1: Connection established.
> debug3: Incorrect RSA1 identifier
> debug3: Could not load "/Users/plsuh/.ssh/id_rsa" as a RSA1 public key
> debug1: identity file /Users/plsuh/.ssh/id_rsa type 1
> debug1: identity file /Users/plsuh/.ssh/id_rsa-cert type -1
> debug3: Incorrect RSA1 identifier
> debug3: Could not load "/Users/plsuh/.ssh/id_dsa" as a RSA1 public key
> debug1: identity file /Users/plsuh/.ssh/id_dsa type 2
> debug1: identity file /Users/plsuh/.ssh/id_dsa-cert type -1
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_6.2
> debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
> debug1: match: OpenSSH_6.6.1 pat OpenSSH*
> debug2: fd 3 setting O_NONBLOCK
> debug3: put_host_port: [ravelin-ext.goodeast.com]:2022
> debug3: load_hostkeys: loading entries for host "[ravelin-ext.goodeast.com]:2022" from file "/Users/plsuh/.ssh/known_hosts"
> debug3: load_hostkeys: found key type RSA in file /Users/plsuh/.ssh/known_hosts:251
> debug3: load_hostkeys: loaded 1 keys
> debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@xxxxxxxxxxx,ssh-rsa-cert-v00@xxxxxxxxxxx,ssh-rsa
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
> debug2: kex_parse_kexinit: ssh-rsa-cert-v01@xxxxxxxxxxx,ssh-rsa-cert-v00@xxxxxxxxxxx,ssh-rsa,ssh-dss-cert-v01@xxxxxxxxxxx,ssh-dss-cert-v00@xxxxxxxxxxx,ssh-dss
> debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@xxxxxxxxxxx,aes256-gcm@xxxxxxxxxxx,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@xxxxxxxxxxxxxx
> debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@xxxxxxxxxxx,aes256-gcm@xxxxxxxxxxx,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@xxxxxxxxxxxxxx
> debug2: kex_parse_kexinit: hmac-md5-etm@xxxxxxxxxxx,hmac-sha1-etm@xxxxxxxxxxx,umac-64-etm@xxxxxxxxxxx,umac-128-etm@xxxxxxxxxxx,hmac-sha2-256-etm@xxxxxxxxxxx,hmac-sha2-512-etm@xxxxxxxxxxx,hmac-ripemd160-etm@xxxxxxxxxxx,hmac-sha1-96-etm@xxxxxxxxxxx,hmac-md5-96-etm@xxxxxxxxxxx,hmac-md5,hmac-sha1,umac-64@xxxxxxxxxxx,umac-128@xxxxxxxxxxx,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: hmac-md5-etm@xxxxxxxxxxx,hmac-sha1-etm@xxxxxxxxxxx,umac-64-etm@xxxxxxxxxxx,umac-128-etm@xxxxxxxxxxx,hmac-sha2-256-etm@xxxxxxxxxxx,hmac-sha2-512-etm@xxxxxxxxxxx,hmac-ripemd160-etm@xxxxxxxxxxx,hmac-sha1-96-etm@xxxxxxxxxxx,hmac-md5-96-etm@xxxxxxxxxxx,hmac-md5,hmac-sha1,umac-64@xxxxxxxxxxx,umac-128@xxxxxxxxxxx,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: none,zlib@xxxxxxxxxxx,zlib
> debug2: kex_parse_kexinit: none,zlib@xxxxxxxxxxx,zlib
> debug2: kex_parse_kexinit: 
> debug2: kex_parse_kexinit: 
> debug2: kex_parse_kexinit: first_kex_follows 0 
> debug2: kex_parse_kexinit: reserved 0 
> debug2: kex_parse_kexinit: curve25519-sha256@xxxxxxxxxx,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
> debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
> debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@xxxxxxxxxxx,aes256-gcm@xxxxxxxxxxx,chacha20-poly1305@xxxxxxxxxxx,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@xxxxxxxxxxxxxx
> debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@xxxxxxxxxxx,aes256-gcm@xxxxxxxxxxx,chacha20-poly1305@xxxxxxxxxxx,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@xxxxxxxxxxxxxx
> debug2: kex_parse_kexinit: hmac-md5-etm@xxxxxxxxxxx,hmac-sha1-etm@xxxxxxxxxxx,umac-64-etm@xxxxxxxxxxx,umac-128-etm@xxxxxxxxxxx,hmac-sha2-256-etm@xxxxxxxxxxx,hmac-sha2-512-etm@xxxxxxxxxxx,hmac-ripemd160-etm@xxxxxxxxxxx,hmac-sha1-96-etm@xxxxxxxxxxx,hmac-md5-96-etm@xxxxxxxxxxx,hmac-md5,hmac-sha1,umac-64@xxxxxxxxxxx,umac-128@xxxxxxxxxxx,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: hmac-md5-etm@xxxxxxxxxxx,hmac-sha1-etm@xxxxxxxxxxx,umac-64-etm@xxxxxxxxxxx,umac-128-etm@xxxxxxxxxxx,hmac-sha2-256-etm@xxxxxxxxxxx,hmac-sha2-512-etm@xxxxxxxxxxx,hmac-ripemd160-etm@xxxxxxxxxxx,hmac-sha1-96-etm@xxxxxxxxxxx,hmac-md5-96-etm@xxxxxxxxxxx,hmac-md5,hmac-sha1,umac-64@xxxxxxxxxxx,umac-128@xxxxxxxxxxx,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: none,zlib@xxxxxxxxxxx
> debug2: kex_parse_kexinit: none,zlib@xxxxxxxxxxx
> debug2: kex_parse_kexinit: 
> debug2: kex_parse_kexinit: 
> debug2: kex_parse_kexinit: first_kex_follows 0 
> debug2: kex_parse_kexinit: reserved 0 
> debug2: mac_setup: found hmac-md5-etm@xxxxxxxxxxx
> debug1: kex: server->client aes128-ctr hmac-md5-etm@xxxxxxxxxxx none
> debug2: mac_setup: found hmac-md5-etm@xxxxxxxxxxx
> debug1: kex: client->server aes128-ctr hmac-md5-etm@xxxxxxxxxxx none
> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
> debug2: dh_gen_key: priv key bits set: 129/256
> debug2: bits set: 520/1024
> debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
> debug1: Server host key: RSA 97:df:ac:ab:c2:05:af:01:68:61:32:65:18:5a:f8:81
> debug3: put_host_port: [209.190.244.103]:2022
> debug3: put_host_port: [ravelin-ext.goodeast.com]:2022
> debug3: load_hostkeys: loading entries for host "[ravelin-ext.goodeast.com]:2022" from file "/Users/plsuh/.ssh/known_hosts"
> debug3: load_hostkeys: found key type RSA in file /Users/plsuh/.ssh/known_hosts:251
> debug3: load_hostkeys: loaded 1 keys
> debug3: load_hostkeys: loading entries for host "[209.190.244.103]:2022" from file "/Users/plsuh/.ssh/known_hosts"
> debug3: load_hostkeys: found key type RSA in file /Users/plsuh/.ssh/known_hosts:250
> debug3: load_hostkeys: loaded 1 keys
> debug1: Host '[ravelin-ext.goodeast.com]:2022' is known and matches the RSA host key.
> debug1: Found key in /Users/plsuh/.ssh/known_hosts:251
> debug2: bits set: 498/1024
> debug1: ssh_rsa_verify: signature correct
> debug2: kex_derive_keys
> debug2: set_newkeys: mode 1
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug2: set_newkeys: mode 0
> debug1: SSH2_MSG_NEWKEYS received
> debug1: Roaming not allowed by server
> debug1: SSH2_MSG_SERVICE_REQUEST sent
> debug2: service_accept: ssh-userauth
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug2: key: /Users/plsuh/.ssh/id_rsa (0x7fe2b940b6e0),
> debug2: key: /Users/plsuh/.ssh/id_dsa (0x7fe2b940bde0),
> debug1: Authentications that can continue: publickey,password,keyboard-interactive
> debug3: start over, passed a different list publickey,password,keyboard-interactive
> debug3: preferred publickey,keyboard-interactive,password
> debug3: authmethod_lookup publickey
> debug3: remaining preferred: keyboard-interactive,password
> debug3: authmethod_is_enabled publickey
> debug1: Next authentication method: publickey
> debug1: Offering RSA public key: /Users/plsuh/.ssh/id_rsa
> debug3: send_pubkey_test
> debug2: we sent a publickey packet, wait for reply
> debug1: Server accepts key: pkalg ssh-rsa blen 533
> debug2: input_userauth_pk_ok: fp d9:b9:38:41:b2:bd:ec:6d:15:4b:36:3a:12:4b:57:12
> debug3: sign_and_send_pubkey: RSA d9:b9:38:41:b2:bd:ec:6d:15:4b:36:3a:12:4b:57:12
> debug1: Authentication succeeded (publickey).
> Authenticated to ravelin-ext.goodeast.com ([209.190.244.103]:2022).
> debug1: channel 0: new [client-session]
> debug3: ssh_session2_open: channel_new: 0
> debug2: channel 0: send open
> debug1: Requesting no-more-sessions@xxxxxxxxxxx
> debug1: Entering interactive session.
> debug2: callback start
> debug2: fd 3 setting TCP_NODELAY
> debug3: packet_set_tos: set IP_TOS 0x10
> debug2: client_session2_setup: id 0
> debug2: channel 0: request pty-req confirm 1
> debug1: Sending environment.
> debug3: Ignored env TERM_PROGRAM
> debug3: Ignored env SHELL
> debug3: Ignored env TERM
> debug3: Ignored env TMPDIR
> debug3: Ignored env Apple_PubSub_Socket_Render
> debug3: Ignored env TERM_PROGRAM_VERSION
> debug3: Ignored env TERM_SESSION_ID
> debug3: Ignored env USER
> debug3: Ignored env SSH_AUTH_SOCK
> debug3: Ignored env __CF_USER_TEXT_ENCODING
> debug3: Ignored env PATH
> debug3: Ignored env __CHECKFIX1436934
> debug3: Ignored env PWD
> debug3: Ignored env DBUS_LAUNCHD_SESSION_BUS_SOCKET
> debug1: Sending env LANG = en_US.UTF-8
> debug2: channel 0: request env confirm 0
> debug3: Ignored env SHLVL
> debug3: Ignored env HOME
> debug3: Ignored env LOGNAME
> debug3: Ignored env DISPLAY
> debug3: Ignored env _
> debug2: channel 0: request shell confirm 1
> debug2: callback done
> debug2: channel 0: open confirm rwindow 0 rmax 32768
> debug2: channel_input_status_confirm: type 99 id 0
> debug2: PTY allocation request accepted on channel 0
> debug2: channel 0: rcvd adjust 2097152
> debug2: channel_input_status_confirm: type 99 id 0
> debug2: shell request accepted on channel 0
> Last login: Sun Oct 19 20:02:46 2014 from 24.231.37.237
> OpenBSD 5.5-stable (FLASHRD.MP) #1: Mon Jun  9 09:53:13 EDT 2014
> 
> Welcome to OpenBSD: The proactively secure Unix-like operating system.
> 
> Please use the sendbug(1) utility to report bugs in the system.
> Before reporting a bug, please try to reproduce it with the latest
> version of the code.  With bug reports, please try to ensure that
> enough information to reproduce the problem is enclosed, and if a
> known fix for it exists, include that as well.
> 
> $ 
> 
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev





[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux