Connection Timed out on SSH Server





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I am using the internet server of university and trying to log in to my account on system from my laptop, using ssh -X username@server. It says connection timed out. when i tried from another system i was able to log in. i use system for pretty basic work and dont know much about the internal coding and all... From some of he pages online i think the problem is firewall or something similar.
I have checked the status for open ssh server which is shown as active. Kindly guide me through how to solve this problem.










share|improve this question























  • Ubuntu 18.04. and connecting from with in university. and using the address provided by the officilas... the same address works if i am doing it through another system that has the same version of ubuntu.

    – jessica danish
    yesterday











  • i havent done anything to have firewall. "ufw" shows an active status, if thats related?

    – jessica danish
    yesterday


















0















I am using the internet server of university and trying to log in to my account on system from my laptop, using ssh -X username@server. It says connection timed out. when i tried from another system i was able to log in. i use system for pretty basic work and dont know much about the internal coding and all... From some of he pages online i think the problem is firewall or something similar.
I have checked the status for open ssh server which is shown as active. Kindly guide me through how to solve this problem.










share|improve this question























  • Ubuntu 18.04. and connecting from with in university. and using the address provided by the officilas... the same address works if i am doing it through another system that has the same version of ubuntu.

    – jessica danish
    yesterday











  • i havent done anything to have firewall. "ufw" shows an active status, if thats related?

    – jessica danish
    yesterday














0












0








0








I am using the internet server of university and trying to log in to my account on system from my laptop, using ssh -X username@server. It says connection timed out. when i tried from another system i was able to log in. i use system for pretty basic work and dont know much about the internal coding and all... From some of he pages online i think the problem is firewall or something similar.
I have checked the status for open ssh server which is shown as active. Kindly guide me through how to solve this problem.










share|improve this question














I am using the internet server of university and trying to log in to my account on system from my laptop, using ssh -X username@server. It says connection timed out. when i tried from another system i was able to log in. i use system for pretty basic work and dont know much about the internal coding and all... From some of he pages online i think the problem is firewall or something similar.
I have checked the status for open ssh server which is shown as active. Kindly guide me through how to solve this problem.







networking server ssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









jessica danishjessica danish

32




32













  • Ubuntu 18.04. and connecting from with in university. and using the address provided by the officilas... the same address works if i am doing it through another system that has the same version of ubuntu.

    – jessica danish
    yesterday











  • i havent done anything to have firewall. "ufw" shows an active status, if thats related?

    – jessica danish
    yesterday



















  • Ubuntu 18.04. and connecting from with in university. and using the address provided by the officilas... the same address works if i am doing it through another system that has the same version of ubuntu.

    – jessica danish
    yesterday











  • i havent done anything to have firewall. "ufw" shows an active status, if thats related?

    – jessica danish
    yesterday

















Ubuntu 18.04. and connecting from with in university. and using the address provided by the officilas... the same address works if i am doing it through another system that has the same version of ubuntu.

– jessica danish
yesterday





Ubuntu 18.04. and connecting from with in university. and using the address provided by the officilas... the same address works if i am doing it through another system that has the same version of ubuntu.

– jessica danish
yesterday













i havent done anything to have firewall. "ufw" shows an active status, if thats related?

– jessica danish
yesterday





i havent done anything to have firewall. "ufw" shows an active status, if thats related?

– jessica danish
yesterday










2 Answers
2






active

oldest

votes


















0














Install ufw It will handle the firewall.



This guide will help you go through the basics of firewalls.



https://www.linode.com/docs/security/firewalls/configure-firewall-with-ufw/



Run these commands on the ssh-server machine



sudo apt-get install ufw
sudo ufw allow ssh
sudo ufw enable
sudo ufw status


These will get you through.



Let me know what happened.






share|improve this answer








New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • ufw is already working. and status is also active.

    – jessica danish
    yesterday











  • what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

    – Godfather
    yesterday













  • That it is active.

    – jessica danish
    yesterday











  • I can understand it's active but does it say that port 22 is allowed when you ask for the status?

    – Godfather
    yesterday











  • yes it does. port 22 allowed anywhere.

    – jessica danish
    yesterday



















0














I believe your problem is with your ssh configuration, nothing to do with firewall for outgoing SSH session. See your /etc/ssh/ssh_config file and make sure you enable both the following:



ForwardX11 yes
ForwardX11Trusted yes


For some situation, you might have to turn off trusted mode for things to work (all depends on the SSH setup in your university.



ForwardX11Trusted no


Hope this helps.



(Edited)



In cases where you can't edit the configuration in /etc/ssh/ssh_config, copy the file to your home directory and modify it there.



mkdir $HOME/.ssh
cp /etc/ssh/ssh_config $HOME/.ssh/config


Modify ~/.ssh/config to enable X11 forwarding.






share|improve this answer


























  • Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

    – jessica danish
    16 hours ago











  • See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

    – Bernard Wei
    10 hours ago













  • I have updated the answer on how to have a user specific configuration.

    – Bernard Wei
    9 hours ago











  • I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

    – jessica danish
    1 hour ago












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%2f1133044%2fconnection-timed-out-on-ssh-server%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














Install ufw It will handle the firewall.



This guide will help you go through the basics of firewalls.



https://www.linode.com/docs/security/firewalls/configure-firewall-with-ufw/



Run these commands on the ssh-server machine



sudo apt-get install ufw
sudo ufw allow ssh
sudo ufw enable
sudo ufw status


These will get you through.



Let me know what happened.






share|improve this answer








New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • ufw is already working. and status is also active.

    – jessica danish
    yesterday











  • what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

    – Godfather
    yesterday













  • That it is active.

    – jessica danish
    yesterday











  • I can understand it's active but does it say that port 22 is allowed when you ask for the status?

    – Godfather
    yesterday











  • yes it does. port 22 allowed anywhere.

    – jessica danish
    yesterday
















0














Install ufw It will handle the firewall.



This guide will help you go through the basics of firewalls.



https://www.linode.com/docs/security/firewalls/configure-firewall-with-ufw/



Run these commands on the ssh-server machine



sudo apt-get install ufw
sudo ufw allow ssh
sudo ufw enable
sudo ufw status


These will get you through.



Let me know what happened.






share|improve this answer








New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • ufw is already working. and status is also active.

    – jessica danish
    yesterday











  • what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

    – Godfather
    yesterday













  • That it is active.

    – jessica danish
    yesterday











  • I can understand it's active but does it say that port 22 is allowed when you ask for the status?

    – Godfather
    yesterday











  • yes it does. port 22 allowed anywhere.

    – jessica danish
    yesterday














0












0








0







Install ufw It will handle the firewall.



This guide will help you go through the basics of firewalls.



https://www.linode.com/docs/security/firewalls/configure-firewall-with-ufw/



Run these commands on the ssh-server machine



sudo apt-get install ufw
sudo ufw allow ssh
sudo ufw enable
sudo ufw status


These will get you through.



Let me know what happened.






share|improve this answer








New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










Install ufw It will handle the firewall.



This guide will help you go through the basics of firewalls.



https://www.linode.com/docs/security/firewalls/configure-firewall-with-ufw/



Run these commands on the ssh-server machine



sudo apt-get install ufw
sudo ufw allow ssh
sudo ufw enable
sudo ufw status


These will get you through.



Let me know what happened.







share|improve this answer








New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered yesterday









GodfatherGodfather

65




65




New contributor




Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Godfather is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • ufw is already working. and status is also active.

    – jessica danish
    yesterday











  • what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

    – Godfather
    yesterday













  • That it is active.

    – jessica danish
    yesterday











  • I can understand it's active but does it say that port 22 is allowed when you ask for the status?

    – Godfather
    yesterday











  • yes it does. port 22 allowed anywhere.

    – jessica danish
    yesterday



















  • ufw is already working. and status is also active.

    – jessica danish
    yesterday











  • what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

    – Godfather
    yesterday













  • That it is active.

    – jessica danish
    yesterday











  • I can understand it's active but does it say that port 22 is allowed when you ask for the status?

    – Godfather
    yesterday











  • yes it does. port 22 allowed anywhere.

    – jessica danish
    yesterday

















ufw is already working. and status is also active.

– jessica danish
yesterday





ufw is already working. and status is also active.

– jessica danish
yesterday













what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

– Godfather
yesterday







what does the status show? when you press sudo ufw status is it something like 22/tcp ALLOW ANYWHERE

– Godfather
yesterday















That it is active.

– jessica danish
yesterday





That it is active.

– jessica danish
yesterday













I can understand it's active but does it say that port 22 is allowed when you ask for the status?

– Godfather
yesterday





I can understand it's active but does it say that port 22 is allowed when you ask for the status?

– Godfather
yesterday













yes it does. port 22 allowed anywhere.

– jessica danish
yesterday





yes it does. port 22 allowed anywhere.

– jessica danish
yesterday













0














I believe your problem is with your ssh configuration, nothing to do with firewall for outgoing SSH session. See your /etc/ssh/ssh_config file and make sure you enable both the following:



ForwardX11 yes
ForwardX11Trusted yes


For some situation, you might have to turn off trusted mode for things to work (all depends on the SSH setup in your university.



ForwardX11Trusted no


Hope this helps.



(Edited)



In cases where you can't edit the configuration in /etc/ssh/ssh_config, copy the file to your home directory and modify it there.



mkdir $HOME/.ssh
cp /etc/ssh/ssh_config $HOME/.ssh/config


Modify ~/.ssh/config to enable X11 forwarding.






share|improve this answer


























  • Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

    – jessica danish
    16 hours ago











  • See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

    – Bernard Wei
    10 hours ago













  • I have updated the answer on how to have a user specific configuration.

    – Bernard Wei
    9 hours ago











  • I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

    – jessica danish
    1 hour ago
















0














I believe your problem is with your ssh configuration, nothing to do with firewall for outgoing SSH session. See your /etc/ssh/ssh_config file and make sure you enable both the following:



ForwardX11 yes
ForwardX11Trusted yes


For some situation, you might have to turn off trusted mode for things to work (all depends on the SSH setup in your university.



ForwardX11Trusted no


Hope this helps.



(Edited)



In cases where you can't edit the configuration in /etc/ssh/ssh_config, copy the file to your home directory and modify it there.



mkdir $HOME/.ssh
cp /etc/ssh/ssh_config $HOME/.ssh/config


Modify ~/.ssh/config to enable X11 forwarding.






share|improve this answer


























  • Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

    – jessica danish
    16 hours ago











  • See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

    – Bernard Wei
    10 hours ago













  • I have updated the answer on how to have a user specific configuration.

    – Bernard Wei
    9 hours ago











  • I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

    – jessica danish
    1 hour ago














0












0








0







I believe your problem is with your ssh configuration, nothing to do with firewall for outgoing SSH session. See your /etc/ssh/ssh_config file and make sure you enable both the following:



ForwardX11 yes
ForwardX11Trusted yes


For some situation, you might have to turn off trusted mode for things to work (all depends on the SSH setup in your university.



ForwardX11Trusted no


Hope this helps.



(Edited)



In cases where you can't edit the configuration in /etc/ssh/ssh_config, copy the file to your home directory and modify it there.



mkdir $HOME/.ssh
cp /etc/ssh/ssh_config $HOME/.ssh/config


Modify ~/.ssh/config to enable X11 forwarding.






share|improve this answer















I believe your problem is with your ssh configuration, nothing to do with firewall for outgoing SSH session. See your /etc/ssh/ssh_config file and make sure you enable both the following:



ForwardX11 yes
ForwardX11Trusted yes


For some situation, you might have to turn off trusted mode for things to work (all depends on the SSH setup in your university.



ForwardX11Trusted no


Hope this helps.



(Edited)



In cases where you can't edit the configuration in /etc/ssh/ssh_config, copy the file to your home directory and modify it there.



mkdir $HOME/.ssh
cp /etc/ssh/ssh_config $HOME/.ssh/config


Modify ~/.ssh/config to enable X11 forwarding.







share|improve this answer














share|improve this answer



share|improve this answer








edited 9 hours ago

























answered yesterday









Bernard WeiBernard Wei

975413




975413













  • Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

    – jessica danish
    16 hours ago











  • See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

    – Bernard Wei
    10 hours ago













  • I have updated the answer on how to have a user specific configuration.

    – Bernard Wei
    9 hours ago











  • I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

    – jessica danish
    1 hour ago



















  • Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

    – jessica danish
    16 hours ago











  • See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

    – Bernard Wei
    10 hours ago













  • I have updated the answer on how to have a user specific configuration.

    – Bernard Wei
    9 hours ago











  • I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

    – jessica danish
    1 hour ago

















Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

– jessica danish
16 hours ago





Thank you for your help. i think that is actually the problem, "ForwardX11 no" i found this in the file you mentioned, but it is not allowing for the editing. what i mean is i cant save it after editting. can you kindly guide me about that...

– jessica danish
16 hours ago













See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

– Bernard Wei
10 hours ago







See if you can make a copy of the configuration file to your home directory as my.config make the modification there and then launch it with ssh -X -F my.config username@server

– Bernard Wei
10 hours ago















I have updated the answer on how to have a user specific configuration.

– Bernard Wei
9 hours ago





I have updated the answer on how to have a user specific configuration.

– Bernard Wei
9 hours ago













I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

– jessica danish
1 hour ago





I tried the both methods. "~/.ssh/config" says permission denied and ssh -X -F my.config username@server is still connection timed out. Thank you for your time and kind help. i think i might be doing it the wrong way.

– jessica danish
1 hour ago


















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%2f1133044%2fconnection-timed-out-on-ssh-server%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

GameSpot

connect to host localhost port 22: Connection refused

Getting a Wifi WPA2 wifi connection