SSH Connection Refused Centos

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have centos 6.9 installed in one of my machines.

I have a difficulty enabling ssh for remote connection. I always get "Refused Connection" in Putty.

I can use ssh via localhost. Iptables shows that incoming connection is accepting port 22.



Below command is how i use to connect via terminal/server.



root: ssh xx@localhost



My connection is directly to my modem isp.



Linux(centos)-->PublicIP-->ISPModem-->Internet.



I am trying to access my sever from the internet and i got connection refused error. From localhost ssh is good but outside localhost i got error.



I've been debugging this whole day now. Can't find any solution.



Do you have any solution?







share|improve this question





















  • What is your ssh command (sanitized for secrets)? Can you ping the host used in that command from where you are connecting?
    – ajeh
    May 9 at 21:55










  • sorry what do you mean by that? what do you mean ping in that command? getting confuse.. sorry.
    – buhatar
    May 9 at 23:26










  • Step 1: provide the full ssh command you are using (not in comment, update the question). We'll go from there. Replace user name and password with fake of course.
    – ajeh
    May 10 at 0:01











  • post is now updated.
    – buhatar
    May 10 at 13:42










  • You said earlier that localhost works, so what command is causing the problem?
    – ajeh
    May 10 at 13:48














up vote
0
down vote

favorite












I have centos 6.9 installed in one of my machines.

I have a difficulty enabling ssh for remote connection. I always get "Refused Connection" in Putty.

I can use ssh via localhost. Iptables shows that incoming connection is accepting port 22.



Below command is how i use to connect via terminal/server.



root: ssh xx@localhost



My connection is directly to my modem isp.



Linux(centos)-->PublicIP-->ISPModem-->Internet.



I am trying to access my sever from the internet and i got connection refused error. From localhost ssh is good but outside localhost i got error.



I've been debugging this whole day now. Can't find any solution.



Do you have any solution?







share|improve this question





















  • What is your ssh command (sanitized for secrets)? Can you ping the host used in that command from where you are connecting?
    – ajeh
    May 9 at 21:55










  • sorry what do you mean by that? what do you mean ping in that command? getting confuse.. sorry.
    – buhatar
    May 9 at 23:26










  • Step 1: provide the full ssh command you are using (not in comment, update the question). We'll go from there. Replace user name and password with fake of course.
    – ajeh
    May 10 at 0:01











  • post is now updated.
    – buhatar
    May 10 at 13:42










  • You said earlier that localhost works, so what command is causing the problem?
    – ajeh
    May 10 at 13:48












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have centos 6.9 installed in one of my machines.

I have a difficulty enabling ssh for remote connection. I always get "Refused Connection" in Putty.

I can use ssh via localhost. Iptables shows that incoming connection is accepting port 22.



Below command is how i use to connect via terminal/server.



root: ssh xx@localhost



My connection is directly to my modem isp.



Linux(centos)-->PublicIP-->ISPModem-->Internet.



I am trying to access my sever from the internet and i got connection refused error. From localhost ssh is good but outside localhost i got error.



I've been debugging this whole day now. Can't find any solution.



Do you have any solution?







share|improve this question













I have centos 6.9 installed in one of my machines.

I have a difficulty enabling ssh for remote connection. I always get "Refused Connection" in Putty.

I can use ssh via localhost. Iptables shows that incoming connection is accepting port 22.



Below command is how i use to connect via terminal/server.



root: ssh xx@localhost



My connection is directly to my modem isp.



Linux(centos)-->PublicIP-->ISPModem-->Internet.



I am trying to access my sever from the internet and i got connection refused error. From localhost ssh is good but outside localhost i got error.



I've been debugging this whole day now. Can't find any solution.



Do you have any solution?









share|improve this question












share|improve this question




share|improve this question








edited May 10 at 14:14
























asked May 9 at 21:33









buhatar

12




12











  • What is your ssh command (sanitized for secrets)? Can you ping the host used in that command from where you are connecting?
    – ajeh
    May 9 at 21:55










  • sorry what do you mean by that? what do you mean ping in that command? getting confuse.. sorry.
    – buhatar
    May 9 at 23:26










  • Step 1: provide the full ssh command you are using (not in comment, update the question). We'll go from there. Replace user name and password with fake of course.
    – ajeh
    May 10 at 0:01











  • post is now updated.
    – buhatar
    May 10 at 13:42










  • You said earlier that localhost works, so what command is causing the problem?
    – ajeh
    May 10 at 13:48
















  • What is your ssh command (sanitized for secrets)? Can you ping the host used in that command from where you are connecting?
    – ajeh
    May 9 at 21:55










  • sorry what do you mean by that? what do you mean ping in that command? getting confuse.. sorry.
    – buhatar
    May 9 at 23:26










  • Step 1: provide the full ssh command you are using (not in comment, update the question). We'll go from there. Replace user name and password with fake of course.
    – ajeh
    May 10 at 0:01











  • post is now updated.
    – buhatar
    May 10 at 13:42










  • You said earlier that localhost works, so what command is causing the problem?
    – ajeh
    May 10 at 13:48















What is your ssh command (sanitized for secrets)? Can you ping the host used in that command from where you are connecting?
– ajeh
May 9 at 21:55




What is your ssh command (sanitized for secrets)? Can you ping the host used in that command from where you are connecting?
– ajeh
May 9 at 21:55












sorry what do you mean by that? what do you mean ping in that command? getting confuse.. sorry.
– buhatar
May 9 at 23:26




sorry what do you mean by that? what do you mean ping in that command? getting confuse.. sorry.
– buhatar
May 9 at 23:26












Step 1: provide the full ssh command you are using (not in comment, update the question). We'll go from there. Replace user name and password with fake of course.
– ajeh
May 10 at 0:01





Step 1: provide the full ssh command you are using (not in comment, update the question). We'll go from there. Replace user name and password with fake of course.
– ajeh
May 10 at 0:01













post is now updated.
– buhatar
May 10 at 13:42




post is now updated.
– buhatar
May 10 at 13:42












You said earlier that localhost works, so what command is causing the problem?
– ajeh
May 10 at 13:48




You said earlier that localhost works, so what command is causing the problem?
– ajeh
May 10 at 13:48















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442869%2fssh-connection-refused-centos%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442869%2fssh-connection-refused-centos%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)