Javascript required
Skip to content Skip to sidebar Skip to footer

Ssh Connect to Host Port 22 Connection Refused Ubuntu

Ssh Connect to Host Port 22 Connection Refused Ubuntu

  1. Exclamation [SOLVED] SSH Problems -> port 22: Connection refused

    How-do-you-do

    I need some assist, i have installed openssh-server, i can connect using ssh localhost and i can connect using any other computer inside my lan network.

    The trouble is when i try to connect from outside the lan.
    I have set up port forwarding to forward port 22 to my internal ip address which is 192.168.1.8

    (router is 192.168.ane.1)

    error is;

    ssh: connect to host xxx.xxx.thirty.30 port 22: Connection refused

    When i utilise telent, same trouble, but when using telnet without port i can connect to my router.

    I scan my reckoner with GRC ShieldsUP! and port 22 is OPEN

    I have fastened output of ssh_config,sshd_config and netstat.

    Please help me, this is driving me crazy

    Thanks anyway !!


  2. Re: SSH Problems -> port 22: Connection refused

    This is methinks, a router issue regarding NAT. Yous take proved ssh works backside your router, so sshd.conf etc accept no relevance here, unless you set limitations on what IPs can connect.

    And then, look to your router docs... You want to forrard your local IP port to your WAN IP port. That beingness so, you

    not 192.168.one.1

    If yous know this,my apologies but it is not clear.

    BTW, when you get this working, retrieve about disabling countersign login and use shared fundamental also every bit shifting the ssh port to another. That mode you will be saved from the animate being-force bots which Will take a go at you (assuming your router is world visible).

    rgrds,

    HA


  3. Re: SSH Problems -> port 22: Connectedness refused

    ssh works perfect locally!!

    When i utilise this

    ssh User@WANip ->

    connect to host xxx.xxx.xxx.30 port 22: Connexion refused

    My ROUTER is ZyXEL P-660HW-D3, im very sure that port forwarding is prepare correctly (NAT)

    As described hither

    http://portforward.com/english language/route...0HW-D1/SSH.htm

    Is there any way to run into if this is router problem or...?

    I out of ideas


  4. Re: SSH Problems -> port 22: Connection refused

    sad in a blitz....

    ii things, try

    Code:

    ssh -vvv user@WANIP
    . This will give verbose output.

    Besides, you can kill the sshd daemon

    Code:

    sudo /etc/init.d/ssh stop
    and then run

    Code:

    sudo /usr/sbin/sshd -d
    . This will keep the server in the foreground and impress debug to the terminal.

    Combined, both should reveal annihilation that the sshd does not like. If nada registers in the sshd last then you are not getting through to it and the router NAT is prolly the upshot.

    HA


  5. Re: SSH Problems -> port 22: Connectedness refused

    No problem thx for helping me out....

    This time i changed the port on router and on ssh (443), working locally!

    output of....--->

    ssh -vvv ivan@thirty.xxx.xxx.xxx -p 443
    OpenSSH_5.1p1 Debian-two, OpenSSL 0.ix.8g nineteen Oct 2007
    debug1: Reading configuration information /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.thirty.xxx] port 443.
    debug1: connect to address xxx.xxx.xxx.xxx port 443: Connectedness refused
    ssh: connect to host thirty.xxx.thirty.thirty port 443: Connexion refused

    And output of this....

    /usr/sbin/sshd -d
    debug1: sshd version OpenSSH_5.1p1 Debian-two
    debug1: read PEM individual cardinal done: blazon RSA
    debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
    debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
    debug1: private host cardinal: #0 type one RSA
    debug1: read PEM individual primal done: type DSA
    debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
    debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
    debug1: individual host cardinal: #1 type 2 DSA
    debug1: rexec_argv[0]='/usr/sbin/sshd'
    debug1: rexec_argv[i]='-d'
    debug1: Demark to port 443 on ::.
    Server listening on :: port 443.
    debug1: Demark to port 443 on 0.0.0.0.
    Server listening on 0.0.0.0 port 443.

    And when i attempt to connect nothing happens, is this meaning that i cannot laissez passer by router?

    Last edited past ny_NEx; August 31st, 2008 at 05:39 PM.

  6. Re: SSH Problems -> port 22: Connection refused

    Quote Originally Posted past ny_NEx View Post

    And when i effort to connect nothing happens, is this meaning that i cannot pass past router?

    Yes. The router is rejecting the connect instead of passing it to your PC. If it had done then, then the sshd invoked with the -d option would have shown the interaction that led to the rejection or acceptance of the connection.

    If your router does logging of its firewall rejects there may be clues. I practise not know the ZyXEL P-660HW-D3 personally and it may not log stuff at all. Try tis though, but be quick. Turn off the firewall birthday if you lot can. You should be able to connect and so.

    When yous try to connect, are you trying from inside your LAN but using the external IP accost as opposed to logging in to an external PC and trying to ssh back in? If the former, I wonder about routing...

    HA


  7. Re: SSH Issues -> port 22: Connexion refused

    Hm i volition try to find logs if any.... When i endeavour to conect im using external ip within LAN

    (im trying that from the same computer i desire to connect using ssh)

    ,maybe this is the problem, i will look into information technology a permit you know!

    Till so thanks for your help!

    P.S.

    Firewall if OFF, so i dont empathise rejecting function!

    Last edited past ny_NEx; August 31st, 2008 at 09:45 PM.

  8. Lightbulb Re: SSH Problems -> port 22: Connectedness refused

    I think that problem is solved!!

    Patently it is impossible to test ssh connectedness in this manner (from inside the LAN)

    ssh externalIP(wan IP) -p xxxx

    only

    ssh localhost -p xxxx

    or

    ssh internal (LAN IP) -p xxxx

    So im not sure is this router problem, or something else but its solved for now

    Cheers once again for your assistance!

    Practiced night!


  9. Re: [SOLVED] SSH Problems -> port 22: Connectedness refused

    Strange, as I can practise it just fine. This is a router quirk possibly, or setup.

    In future you lot tin can effort https://world wide web.nacs.uci.edu/ssh for a web based (thus external) ssh client.

    Change the "SSH Server/Allonym: xxx.xxx.xxx.xxx" to your IP or FQDN. Have a go.

    HA
    I would change my countersign immediately afterwards, if not moving over to shared primal (ie passwordless) login.

    Final edited by handaxe; Baronial 31st, 2008 at 11:06 PM. Reason: addition of NB info

  10. Re: [SOLVED] SSH Bug -> port 22: Connection refused

    I will do that!

    Can y'all give me a short description how to practice that with preshared key?


Ssh Connect to Host Port 22 Connection Refused Ubuntu

Posted by: bensoninseatifee.blogspot.com