ssh connection refused, port listening, process running, IP address not banned












0















$ git pull
ssh: connect to host HOSTNAME port 22: Connection refused


This only happens when the client is connected to one specific wireless network. If I connect from a wired connection (even in the same room!) or from any other wireless network (even with the same laptop!), ssh connects fine.



Things I've tried/checked based on other forum posts I've read:




  • Verified ssh is installed and running on both client and server

  • Verified ssh port is open and listening

  • Verified IP address is not banned by fail2ban or ufw (which are running on the server).

  • Verified IP address is not blocked in /etc/hosts.deny


The IP address had been banned in the past so that seemed the most likely candidate, but now the IP address is definitely not banned (I checked multiple times over multiple days). In fact, the failed attempt to connect does not even show up in logs. I checked ufw.log, fail2ban.log, or auth.log



As I said above, I can ssh (for git pull and directly ssh) to this same server from other client machines, or using the same client if I connect it to a different network. So it seems not to be a general configuration problem with ssh or git or fail2ban but rather something with this specific network.



Any ideas?










share|improve this question























  • Seems like a Firewall related issue to me. Could try installing nc and doing tests from wired versus wireless: nc -zv 127.0.0.1 22

    – daithi_dearg
    Feb 5 at 17:07











  • Is this a VPS or localhost? If this is a remote VPS, then you probably need to see if there's a firewall at play at the provider level.

    – Thomas Ward
    Feb 5 at 17:09


















0















$ git pull
ssh: connect to host HOSTNAME port 22: Connection refused


This only happens when the client is connected to one specific wireless network. If I connect from a wired connection (even in the same room!) or from any other wireless network (even with the same laptop!), ssh connects fine.



Things I've tried/checked based on other forum posts I've read:




  • Verified ssh is installed and running on both client and server

  • Verified ssh port is open and listening

  • Verified IP address is not banned by fail2ban or ufw (which are running on the server).

  • Verified IP address is not blocked in /etc/hosts.deny


The IP address had been banned in the past so that seemed the most likely candidate, but now the IP address is definitely not banned (I checked multiple times over multiple days). In fact, the failed attempt to connect does not even show up in logs. I checked ufw.log, fail2ban.log, or auth.log



As I said above, I can ssh (for git pull and directly ssh) to this same server from other client machines, or using the same client if I connect it to a different network. So it seems not to be a general configuration problem with ssh or git or fail2ban but rather something with this specific network.



Any ideas?










share|improve this question























  • Seems like a Firewall related issue to me. Could try installing nc and doing tests from wired versus wireless: nc -zv 127.0.0.1 22

    – daithi_dearg
    Feb 5 at 17:07











  • Is this a VPS or localhost? If this is a remote VPS, then you probably need to see if there's a firewall at play at the provider level.

    – Thomas Ward
    Feb 5 at 17:09
















0












0








0








$ git pull
ssh: connect to host HOSTNAME port 22: Connection refused


This only happens when the client is connected to one specific wireless network. If I connect from a wired connection (even in the same room!) or from any other wireless network (even with the same laptop!), ssh connects fine.



Things I've tried/checked based on other forum posts I've read:




  • Verified ssh is installed and running on both client and server

  • Verified ssh port is open and listening

  • Verified IP address is not banned by fail2ban or ufw (which are running on the server).

  • Verified IP address is not blocked in /etc/hosts.deny


The IP address had been banned in the past so that seemed the most likely candidate, but now the IP address is definitely not banned (I checked multiple times over multiple days). In fact, the failed attempt to connect does not even show up in logs. I checked ufw.log, fail2ban.log, or auth.log



As I said above, I can ssh (for git pull and directly ssh) to this same server from other client machines, or using the same client if I connect it to a different network. So it seems not to be a general configuration problem with ssh or git or fail2ban but rather something with this specific network.



Any ideas?










share|improve this question














$ git pull
ssh: connect to host HOSTNAME port 22: Connection refused


This only happens when the client is connected to one specific wireless network. If I connect from a wired connection (even in the same room!) or from any other wireless network (even with the same laptop!), ssh connects fine.



Things I've tried/checked based on other forum posts I've read:




  • Verified ssh is installed and running on both client and server

  • Verified ssh port is open and listening

  • Verified IP address is not banned by fail2ban or ufw (which are running on the server).

  • Verified IP address is not blocked in /etc/hosts.deny


The IP address had been banned in the past so that seemed the most likely candidate, but now the IP address is definitely not banned (I checked multiple times over multiple days). In fact, the failed attempt to connect does not even show up in logs. I checked ufw.log, fail2ban.log, or auth.log



As I said above, I can ssh (for git pull and directly ssh) to this same server from other client machines, or using the same client if I connect it to a different network. So it seems not to be a general configuration problem with ssh or git or fail2ban but rather something with this specific network.



Any ideas?







networking ssh firewall git






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 5 at 16:24









angelaxangelax

1




1













  • Seems like a Firewall related issue to me. Could try installing nc and doing tests from wired versus wireless: nc -zv 127.0.0.1 22

    – daithi_dearg
    Feb 5 at 17:07











  • Is this a VPS or localhost? If this is a remote VPS, then you probably need to see if there's a firewall at play at the provider level.

    – Thomas Ward
    Feb 5 at 17:09





















  • Seems like a Firewall related issue to me. Could try installing nc and doing tests from wired versus wireless: nc -zv 127.0.0.1 22

    – daithi_dearg
    Feb 5 at 17:07











  • Is this a VPS or localhost? If this is a remote VPS, then you probably need to see if there's a firewall at play at the provider level.

    – Thomas Ward
    Feb 5 at 17:09



















Seems like a Firewall related issue to me. Could try installing nc and doing tests from wired versus wireless: nc -zv 127.0.0.1 22

– daithi_dearg
Feb 5 at 17:07





Seems like a Firewall related issue to me. Could try installing nc and doing tests from wired versus wireless: nc -zv 127.0.0.1 22

– daithi_dearg
Feb 5 at 17:07













Is this a VPS or localhost? If this is a remote VPS, then you probably need to see if there's a firewall at play at the provider level.

– Thomas Ward
Feb 5 at 17:09







Is this a VPS or localhost? If this is a remote VPS, then you probably need to see if there's a firewall at play at the provider level.

– Thomas Ward
Feb 5 at 17:09












0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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%2faskubuntu.com%2fquestions%2f1115859%2fssh-connection-refused-port-listening-process-running-ip-address-not-banned%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • 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%2faskubuntu.com%2fquestions%2f1115859%2fssh-connection-refused-port-listening-process-running-ip-address-not-banned%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

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?