Can't connect to remote server via sshHow can i connect to a remote host using ssh?ssh: connect to host...

How to get the n-th line after a grepped one?

Should I be concerned about student access to a test bank?

What does Deadpool mean by "left the house in that shirt"?

Geography in 3D perspective

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

How is the partial sum of a geometric sequence calculated?

Turning a hard to access nut?

Writing in a Christian voice

Describing a chess game in a novel

Do native speakers use "ultima" and "proxima" frequently in spoken English?

Why didn't Héctor fade away after this character died in the movie Coco?

Are dual Irish/British citizens bound by the 90/180 day rule when travelling in the EU after Brexit?

Using Past-Perfect interchangeably with the Past Continuous

Why is there so much iron?

World War I as a war of liberals against authoritarians?

Do US professors/group leaders only get a salary, but no group budget?

In what cases must I use 了 and in what cases not?

Generic TVP tradeoffs?

A Ri-diddley-iley Riddle

Knife as defense against stray dogs

Can a wizard cast a spell during their first turn of combat if they initiated combat by releasing a readied spell?

Worshiping one God at a time?

Optimising a list searching algorithm

Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?



Can't connect to remote server via ssh


How can i connect to a remote host using ssh?ssh: connect to host 192.168.1.38 port 22: Connection refusedSSH can not connect remotely, but I can ssh via local ipSSH into server on network - and then access a web interface (ip only, no port)SSH :connect to host localhost port 22: Connection refusedSSH Remote Port Forwarding (Tunneling) not working publicly even with GatewayPorts yesSSH cannot connect to serverssh to remote server hangs, but works locally (putty / cygwin / windows 10 to linux)SSH connection timed out / high packet lossConnecting via SSH to university server













0















A month ago I could connect to a remote server via ssh, but for a week, I can't. At the moment I have access to the server locally and when I try to connect to localhost, to test if it works, I can connect.
ssh username@localhost



it's okay locally.



But from a remote machine:



ssh username@ip-address-of-server



I get this message:



ssh: connect to host ip-address-of-server port 22: Connection timed out



On this server is running a webpage also, of course on port 80. The webpage is works.



Note: I can ping the server, with 0% packet loss, so I received all the transmitted packets.



I've already tried to restart the ssh on server, but still not working. Only locally to localhost, but not remotely.



I tried from different remote machines with no success.



So, why could I connect earlier, and not now? What's the problem?



I asked this already on [stackoverflow.com][1], but now it's put on hold as off-topic there.










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What does netstat -nlt | grep -w 22 show, on the server?

    – ams
    Apr 1 '16 at 12:01













  • tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN

    – Sir Alexander
    Apr 1 '16 at 12:33











  • Looks fine. If the auth.log shows nothing then I'd say there's a firewall or broken NAT port mapping somewhere.

    – ams
    Apr 1 '16 at 12:34











  • And how can be fix these problems?

    – Sir Alexander
    Apr 1 '16 at 12:37











  • You have to find them first; if you didn't set up a firewall on your server then the problem is most likely elsewhere, but you can check the rules with iptables -L.

    – ams
    Apr 1 '16 at 12:44
















0















A month ago I could connect to a remote server via ssh, but for a week, I can't. At the moment I have access to the server locally and when I try to connect to localhost, to test if it works, I can connect.
ssh username@localhost



it's okay locally.



But from a remote machine:



ssh username@ip-address-of-server



I get this message:



ssh: connect to host ip-address-of-server port 22: Connection timed out



On this server is running a webpage also, of course on port 80. The webpage is works.



Note: I can ping the server, with 0% packet loss, so I received all the transmitted packets.



I've already tried to restart the ssh on server, but still not working. Only locally to localhost, but not remotely.



I tried from different remote machines with no success.



So, why could I connect earlier, and not now? What's the problem?



I asked this already on [stackoverflow.com][1], but now it's put on hold as off-topic there.










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What does netstat -nlt | grep -w 22 show, on the server?

    – ams
    Apr 1 '16 at 12:01













  • tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN

    – Sir Alexander
    Apr 1 '16 at 12:33











  • Looks fine. If the auth.log shows nothing then I'd say there's a firewall or broken NAT port mapping somewhere.

    – ams
    Apr 1 '16 at 12:34











  • And how can be fix these problems?

    – Sir Alexander
    Apr 1 '16 at 12:37











  • You have to find them first; if you didn't set up a firewall on your server then the problem is most likely elsewhere, but you can check the rules with iptables -L.

    – ams
    Apr 1 '16 at 12:44














0












0








0








A month ago I could connect to a remote server via ssh, but for a week, I can't. At the moment I have access to the server locally and when I try to connect to localhost, to test if it works, I can connect.
ssh username@localhost



it's okay locally.



But from a remote machine:



ssh username@ip-address-of-server



I get this message:



ssh: connect to host ip-address-of-server port 22: Connection timed out



On this server is running a webpage also, of course on port 80. The webpage is works.



Note: I can ping the server, with 0% packet loss, so I received all the transmitted packets.



I've already tried to restart the ssh on server, but still not working. Only locally to localhost, but not remotely.



I tried from different remote machines with no success.



So, why could I connect earlier, and not now? What's the problem?



I asked this already on [stackoverflow.com][1], but now it's put on hold as off-topic there.










share|improve this question
















A month ago I could connect to a remote server via ssh, but for a week, I can't. At the moment I have access to the server locally and when I try to connect to localhost, to test if it works, I can connect.
ssh username@localhost



it's okay locally.



But from a remote machine:



ssh username@ip-address-of-server



I get this message:



ssh: connect to host ip-address-of-server port 22: Connection timed out



On this server is running a webpage also, of course on port 80. The webpage is works.



Note: I can ping the server, with 0% packet loss, so I received all the transmitted packets.



I've already tried to restart the ssh on server, but still not working. Only locally to localhost, but not remotely.



I tried from different remote machines with no success.



So, why could I connect earlier, and not now? What's the problem?



I asked this already on [stackoverflow.com][1], but now it's put on hold as off-topic there.







linux networking ssh remote-access






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 1 '16 at 11:59









manjesh23

1,342728




1,342728










asked Apr 1 '16 at 11:54









Sir AlexanderSir Alexander

12




12





bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • What does netstat -nlt | grep -w 22 show, on the server?

    – ams
    Apr 1 '16 at 12:01













  • tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN

    – Sir Alexander
    Apr 1 '16 at 12:33











  • Looks fine. If the auth.log shows nothing then I'd say there's a firewall or broken NAT port mapping somewhere.

    – ams
    Apr 1 '16 at 12:34











  • And how can be fix these problems?

    – Sir Alexander
    Apr 1 '16 at 12:37











  • You have to find them first; if you didn't set up a firewall on your server then the problem is most likely elsewhere, but you can check the rules with iptables -L.

    – ams
    Apr 1 '16 at 12:44



















  • What does netstat -nlt | grep -w 22 show, on the server?

    – ams
    Apr 1 '16 at 12:01













  • tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN

    – Sir Alexander
    Apr 1 '16 at 12:33











  • Looks fine. If the auth.log shows nothing then I'd say there's a firewall or broken NAT port mapping somewhere.

    – ams
    Apr 1 '16 at 12:34











  • And how can be fix these problems?

    – Sir Alexander
    Apr 1 '16 at 12:37











  • You have to find them first; if you didn't set up a firewall on your server then the problem is most likely elsewhere, but you can check the rules with iptables -L.

    – ams
    Apr 1 '16 at 12:44

















What does netstat -nlt | grep -w 22 show, on the server?

– ams
Apr 1 '16 at 12:01







What does netstat -nlt | grep -w 22 show, on the server?

– ams
Apr 1 '16 at 12:01















tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN

– Sir Alexander
Apr 1 '16 at 12:33





tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN

– Sir Alexander
Apr 1 '16 at 12:33













Looks fine. If the auth.log shows nothing then I'd say there's a firewall or broken NAT port mapping somewhere.

– ams
Apr 1 '16 at 12:34





Looks fine. If the auth.log shows nothing then I'd say there's a firewall or broken NAT port mapping somewhere.

– ams
Apr 1 '16 at 12:34













And how can be fix these problems?

– Sir Alexander
Apr 1 '16 at 12:37





And how can be fix these problems?

– Sir Alexander
Apr 1 '16 at 12:37













You have to find them first; if you didn't set up a firewall on your server then the problem is most likely elsewhere, but you can check the rules with iptables -L.

– ams
Apr 1 '16 at 12:44





You have to find them first; if you didn't set up a firewall on your server then the problem is most likely elsewhere, but you can check the rules with iptables -L.

– ams
Apr 1 '16 at 12:44










2 Answers
2






active

oldest

votes


















0














Do the following at your remote server while trying to connect via ssh:



tail -f /var/log/auth.log


Is there any getting error logged?
If you cant see any logs produced by your attempted login, this is propably a network problem (firewall, switch acls, etc.).






share|improve this answer
























  • No logs received. Probably the problem is with the firewall of the server?

    – Sir Alexander
    Apr 1 '16 at 12:34











  • Did you set up a server firewall? I was talking about a "real" network firewall.

    – hub
    Apr 1 '16 at 13:14





















0














As you describe the scenario, you want to perform "inside access" and "outside access". In your case, I understand that inside access gets done from a host towards a SSH server both residing on the same IP subnet. On the other hand, you mention "remote access" which I suppose you refer to getting access to the SSH server from a host that resides on another IP subnet (outside access). The only way to do the latest is via a router and on the top of this, the router should be able to perform a very basic functionality called Port Forwarding. Having said that, for some reason your router has lost the port forwarding capability. There are two possibilities: to restart the router because it became "buggy" or to revise the port forwarding configuration on the router that forwards the external call towards the SSH port of the router to the SSH port of the internal SSH server. Please note that many other factors may apply but the description does not provide enough information to further support the case. In either case, the troubleshooting efforts should be put on router analyzing if the router receives SSH calls/hits on the external interface and if so, analyzing why the router does not forward the SSH traffic towards the internal SSH server. If you got the solution to work in the past as "per magic" without "doing anything", please check the UPnP activation/capabilities on both, the router and the server.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1060092%2fcant-connect-to-remote-server-via-ssh%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Do the following at your remote server while trying to connect via ssh:



    tail -f /var/log/auth.log


    Is there any getting error logged?
    If you cant see any logs produced by your attempted login, this is propably a network problem (firewall, switch acls, etc.).






    share|improve this answer
























    • No logs received. Probably the problem is with the firewall of the server?

      – Sir Alexander
      Apr 1 '16 at 12:34











    • Did you set up a server firewall? I was talking about a "real" network firewall.

      – hub
      Apr 1 '16 at 13:14


















    0














    Do the following at your remote server while trying to connect via ssh:



    tail -f /var/log/auth.log


    Is there any getting error logged?
    If you cant see any logs produced by your attempted login, this is propably a network problem (firewall, switch acls, etc.).






    share|improve this answer
























    • No logs received. Probably the problem is with the firewall of the server?

      – Sir Alexander
      Apr 1 '16 at 12:34











    • Did you set up a server firewall? I was talking about a "real" network firewall.

      – hub
      Apr 1 '16 at 13:14
















    0












    0








    0







    Do the following at your remote server while trying to connect via ssh:



    tail -f /var/log/auth.log


    Is there any getting error logged?
    If you cant see any logs produced by your attempted login, this is propably a network problem (firewall, switch acls, etc.).






    share|improve this answer













    Do the following at your remote server while trying to connect via ssh:



    tail -f /var/log/auth.log


    Is there any getting error logged?
    If you cant see any logs produced by your attempted login, this is propably a network problem (firewall, switch acls, etc.).







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 1 '16 at 12:01









    hubhub

    3961315




    3961315













    • No logs received. Probably the problem is with the firewall of the server?

      – Sir Alexander
      Apr 1 '16 at 12:34











    • Did you set up a server firewall? I was talking about a "real" network firewall.

      – hub
      Apr 1 '16 at 13:14





















    • No logs received. Probably the problem is with the firewall of the server?

      – Sir Alexander
      Apr 1 '16 at 12:34











    • Did you set up a server firewall? I was talking about a "real" network firewall.

      – hub
      Apr 1 '16 at 13:14



















    No logs received. Probably the problem is with the firewall of the server?

    – Sir Alexander
    Apr 1 '16 at 12:34





    No logs received. Probably the problem is with the firewall of the server?

    – Sir Alexander
    Apr 1 '16 at 12:34













    Did you set up a server firewall? I was talking about a "real" network firewall.

    – hub
    Apr 1 '16 at 13:14







    Did you set up a server firewall? I was talking about a "real" network firewall.

    – hub
    Apr 1 '16 at 13:14















    0














    As you describe the scenario, you want to perform "inside access" and "outside access". In your case, I understand that inside access gets done from a host towards a SSH server both residing on the same IP subnet. On the other hand, you mention "remote access" which I suppose you refer to getting access to the SSH server from a host that resides on another IP subnet (outside access). The only way to do the latest is via a router and on the top of this, the router should be able to perform a very basic functionality called Port Forwarding. Having said that, for some reason your router has lost the port forwarding capability. There are two possibilities: to restart the router because it became "buggy" or to revise the port forwarding configuration on the router that forwards the external call towards the SSH port of the router to the SSH port of the internal SSH server. Please note that many other factors may apply but the description does not provide enough information to further support the case. In either case, the troubleshooting efforts should be put on router analyzing if the router receives SSH calls/hits on the external interface and if so, analyzing why the router does not forward the SSH traffic towards the internal SSH server. If you got the solution to work in the past as "per magic" without "doing anything", please check the UPnP activation/capabilities on both, the router and the server.






    share|improve this answer




























      0














      As you describe the scenario, you want to perform "inside access" and "outside access". In your case, I understand that inside access gets done from a host towards a SSH server both residing on the same IP subnet. On the other hand, you mention "remote access" which I suppose you refer to getting access to the SSH server from a host that resides on another IP subnet (outside access). The only way to do the latest is via a router and on the top of this, the router should be able to perform a very basic functionality called Port Forwarding. Having said that, for some reason your router has lost the port forwarding capability. There are two possibilities: to restart the router because it became "buggy" or to revise the port forwarding configuration on the router that forwards the external call towards the SSH port of the router to the SSH port of the internal SSH server. Please note that many other factors may apply but the description does not provide enough information to further support the case. In either case, the troubleshooting efforts should be put on router analyzing if the router receives SSH calls/hits on the external interface and if so, analyzing why the router does not forward the SSH traffic towards the internal SSH server. If you got the solution to work in the past as "per magic" without "doing anything", please check the UPnP activation/capabilities on both, the router and the server.






      share|improve this answer


























        0












        0








        0







        As you describe the scenario, you want to perform "inside access" and "outside access". In your case, I understand that inside access gets done from a host towards a SSH server both residing on the same IP subnet. On the other hand, you mention "remote access" which I suppose you refer to getting access to the SSH server from a host that resides on another IP subnet (outside access). The only way to do the latest is via a router and on the top of this, the router should be able to perform a very basic functionality called Port Forwarding. Having said that, for some reason your router has lost the port forwarding capability. There are two possibilities: to restart the router because it became "buggy" or to revise the port forwarding configuration on the router that forwards the external call towards the SSH port of the router to the SSH port of the internal SSH server. Please note that many other factors may apply but the description does not provide enough information to further support the case. In either case, the troubleshooting efforts should be put on router analyzing if the router receives SSH calls/hits on the external interface and if so, analyzing why the router does not forward the SSH traffic towards the internal SSH server. If you got the solution to work in the past as "per magic" without "doing anything", please check the UPnP activation/capabilities on both, the router and the server.






        share|improve this answer













        As you describe the scenario, you want to perform "inside access" and "outside access". In your case, I understand that inside access gets done from a host towards a SSH server both residing on the same IP subnet. On the other hand, you mention "remote access" which I suppose you refer to getting access to the SSH server from a host that resides on another IP subnet (outside access). The only way to do the latest is via a router and on the top of this, the router should be able to perform a very basic functionality called Port Forwarding. Having said that, for some reason your router has lost the port forwarding capability. There are two possibilities: to restart the router because it became "buggy" or to revise the port forwarding configuration on the router that forwards the external call towards the SSH port of the router to the SSH port of the internal SSH server. Please note that many other factors may apply but the description does not provide enough information to further support the case. In either case, the troubleshooting efforts should be put on router analyzing if the router receives SSH calls/hits on the external interface and if so, analyzing why the router does not forward the SSH traffic towards the internal SSH server. If you got the solution to work in the past as "per magic" without "doing anything", please check the UPnP activation/capabilities on both, the router and the server.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 1 '16 at 18:39









        TamaditeTamadite

        10317




        10317






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1060092%2fcant-connect-to-remote-server-via-ssh%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

            Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

            looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...