LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-07-2017, 06:16 AM   #1
avancada
LQ Newbie
 
Registered: Sep 2016
Posts: 7

Rep: Reputation: Disabled
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
 
Old 12-13-2017, 03:49 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,628

Rep: Reputation: 140Reputation: 140
When you login to server1, is it pure SSH or OpenSSH?
 
Old 01-03-2018, 08:20 AM   #3
avancada
LQ Newbie
 
Registered: Sep 2016
Posts: 7

Original Poster
Rep: Reputation: Disabled
'man ssh' gives me the following ouput:
ssh OpenSSH SSH client (remote login program)
 
Old 01-03-2018, 03:26 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,628

Rep: Reputation: 140Reputation: 140
What's debug output when connection is from Desktop directly? Authentication is failure.
 
Old 01-04-2018, 03:13 AM   #5
avancada
LQ Newbie
 
Registered: Sep 2016
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-04-2018, 03:30 AM   #6
avancada
LQ Newbie
 
Registered: Sep 2016
Posts: 7

Original Poster
Rep: Reputation: Disabled
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}
 
Old 01-08-2018, 04:19 PM   #7
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,628

Rep: Reputation: 140Reputation: 140
Quote:
You mean from desktop directly to server2?
Yes.

What's your virtual network?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH port forwarding: connection closed by remote host m_yates Linux - Networking 4 05-16-2014 10:24 AM
[SOLVED] gvfs not working with ssh-agent eponymous Linux - Software 2 03-22-2013 02:50 PM
SSH agent forwarding - without password nak1090 Linux - Software 4 11-23-2011 01:25 PM
ssh-agent forwarding (order of authentication) podollb Linux - Software 8 11-03-2011 08:17 AM
ssh-agent not working properly... assasukasse Linux - Software 1 10-09-2007 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration