LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh agent forwarding from extra host is not working (https://www.linuxquestions.org/questions/linux-networking-3/ssh-agent-forwarding-from-extra-host-is-not-working-4175619127/)

avancada 12-07-2017 05:16 AM

ssh agent forwarding from extra host is not working
 
All,

Normally I'm using my dekstop to connect with ssh to server2 using agent forwarding on server1. This works!
Desktop -> server1 -> server2

When I'm working at home, I'm using my windows laptop to connect to my dekstop. But then I'm not able to connect to server2
Laptop -> Desktop -> server1 (here it stops) -> server2

What can be the problem?
Code:

user@server1:
ssh -v 10.0.99.19
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug1: Connecting to 10.0.99.19 [10.0.99.19] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.0.99.19:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:wUENfHP5BKJqjt76WDYUJG+3IS8nmuTmkIxptqnvAwk
debug1: Host '10.0.99.19' is known and matches the ECDSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure.  Minor code may provide more information


debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/id_rsa
debug1: Trying private key: /home/user/.ssh/id_dsa
debug1: Trying private key: /home/user/.ssh/id_ecdsa
debug1: Trying private key: /home/user/.ssh/id_ed25519
debug1: Next authentication method: password


nini09 12-13-2017 02:49 PM

When you login to server1, is it pure SSH or OpenSSH?

avancada 01-03-2018 07:20 AM

'man ssh' gives me the following ouput:
ssh — OpenSSH SSH client (remote login program)

nini09 01-03-2018 02:26 PM

What's debug output when connection is from Desktop directly? Authentication is failure.

avancada 01-04-2018 02:13 AM

You mean from desktop directly to server2? That is not possible because it is a virtual netwerk that it is in. I have to hop from server1, which has a connection to outside, to server2 which only has a connection in the virtual network.

avancada 01-04-2018 02:30 AM

Here is the last part of the log when connecting directly from my desktop,
the difference is the second line, where it uses the public key: 'debug1: Offering RSA public key: user@desktop.xxx.xx!'
{code}
debug1: Next authentication method: publickey
debug1: Offering RSA public key: user@desktop.xxx.xx
debug1: Server accepts key: pkalg rsa-sha2-512 blen 277
debug1: Authentication succeeded (publickey).
Authenticated to 10.0.99.24 ([10.0.99.24]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Sending environment.
debug1: Sending env XMODIFIERS = @im=none
debug1: Sending env LANG = en_US.UTF-8
{code}

nini09 01-08-2018 03:19 PM

Quote:

You mean from desktop directly to server2?
Yes.

What's your virtual network?


All times are GMT -5. The time now is 05:02 PM.