Find the answer to your Linux question:
Results 1 to 7 of 7
I'm having a problem with ssh on an FC5 server. I can login on my local network, but cannot login from the internet to the same machine. If I run ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Location
    Daventry,UK
    Posts
    4

    Remote ssh login problem with FC5


    I'm having a problem with ssh on an FC5 server. I can login on my local network, but cannot login from the internet to the same machine. If I run "ssh -v -l jaguar 192.168.1.6" I get:
    OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to 192.168.1.6 [192.168.1.6] port 22.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    debug1: identity file /root/.ssh/identity type -1
    debug1: identity file /root/.ssh/id_rsa type -1
    debug1: identity file /root/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.3
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    The authenticity of host '192.168.1.6 (192.168.1.6)' can't be established.
    RSA key fingerprint is 65:de:c1:e5:20:4a:e0:2c:f2:72:b9:07:29:23:54:d9.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.1.6' (RSA) to the list of known hosts.
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,gssapi-with-mic,password
    debug1: Next authentication method: gssapi-with-mic
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address

    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address

    debug1: Next authentication method: publickey
    debug1: Trying private key: /root/.ssh/identity
    debug1: Trying private key: /root/.ssh/id_rsa
    debug1: Trying private key: /root/.ssh/id_dsa
    debug1: Next authentication method: password
    jaguar@192.168.1.6's password:
    debug1: Authentication succeeded (password).
    debug1: channel 0: new [client-session]
    debug1: Entering interactive session.
    debug1: Sending environment.
    debug1: Sending env LANG = en_GB.UTF-8
    Last login: Mon Feb 12 13:55:20 2007 from 192.168.1.5

    But if I try to connect to the same machine via an internet address using "ssh -v -l jaguar 81.152.150.177" I get:

    OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to 81.152.150.177 [81.152.150.177] port 22.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    debug1: identity file /root/.ssh/identity type -1
    debug1: identity file /root/.ssh/id_rsa type -1
    debug1: identity file /root/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version dropbear_0.46
    debug1: no match: dropbear_0.46
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.3
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client 3des-cbc hmac-md5 none
    debug1: kex: client->server 3des-cbc hmac-md5 none
    debug1: sending SSH2_MSG_KEXDH_INIT
    debug1: expecting SSH2_MSG_KEXDH_REPLY
    The authenticity of host '81.152.150.177 (81.152.150.177)' can't be established.
    RSA key fingerprint is 14:6a:29:b4:a0:af:41:f0:cb:de:94:45:f8:de:5c:35.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '81.152.150.177' (RSA) to the list of known hosts.
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    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: Trying private key: /root/.ssh/identity
    debug1: Trying private key: /root/.ssh/id_rsa
    debug1: Trying private key: /root/.ssh/id_dsa
    debug1: Next authentication method: password
    jaguar@81.152.150.177's password:
    debug1: Authentications that can continue: publickey,password
    Permission denied, please try again.

    Any ideas ???

  2. #2
    Linux Newbie
    Join Date
    Jan 2007
    Location
    Cupertino, CA
    Posts
    157
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: Remote protocol version 2.0, remote software version dropbear_0.46
    Look like two different ssh implementations to me. Dropbear is a SSH impl mostly used for embedded linux e.g. a router. Check your port forwarding rules and if possible turn off the ssh client on your router. Or u can log into it first and then log into ur internal machine from there.

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Location
    Daventry,UK
    Posts
    4
    Had never thought of it being a problem with the router - I had created a virtual server to forward port 22 to the server, and have now tried changing this to port 2222. However, it now seems to be trapping all traffic on port 2222. With the command "ssh -v -l jaguar -p 2222 86.145.113.204" I get:
    OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to 86.145.113.204 [86.145.113.204] port 2222.
    debug1: connect to address 86.145.113.204 port 2222: Connection refused
    ssh: connect to host 86.145.113.204 port 2222: Connection refused

    Looks like it is now getting through to the sshd daemon on the server though so there's some progress!!!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Feb 2007
    Location
    Daventry,UK
    Posts
    4
    Forgot to mention that the local network connection still works ok, ie to ssh on 192.168.1.7 port 2222.

  6. #5
    Linux Newbie
    Join Date
    Jan 2007
    Location
    Cupertino, CA
    Posts
    157
    Inyour first post you had mentioned the internal IP as 192.168.1.6 and in the latest post its 192.168.1.7. Are you sure your IP addresses and port forwarding on the router are set up correct. Are you able to login into the router and then into the internal machine from there?

  7. #6
    Just Joined!
    Join Date
    Feb 2007
    Location
    Daventry,UK
    Posts
    4
    Sorry, yes I have setup a vmware server with a default FC5 install (192.168.1.7) just to see if there was anything I'd changed to upset things. The 192.168.1.6 server is a separate PC running FC5. I had changed the port forwarding for testing. I'd heard someone suggest that its not possible to access a server via a forwarded port if you're testing from behind the router. In this case I'm testing from my local network 192.168.1.#

  8. #7
    Linux Newbie
    Join Date
    Jan 2007
    Location
    Cupertino, CA
    Posts
    157
    You wont, by chance, have the iptables turned on on the linux box and have put in filters to allow only local traffic in, would you? I can't think of anything else at this point. Why dont you post screenshots of your router's Virtual server config and the ifconfig -a, iptables -nL outputs and contents of /etc/ssh/sshd_config from your target linux box.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •