ssh connection timed out
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I just started to experiment with ssh and port forwarding. I use ubuntu to ssh into my iMac. The iMac says to use ssh user1@host
and that works fine when I am using the same network. However, when I connect to my Ubuntu to another network, say at work, and try to ssh into my iMac with ssh -v -v -v user1@host -p 22
I get the following output:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connect to address user1@host port 22: Connection timed out
I setup my router to forward port 22 to my iMac's ip address--I'm not sure if my ISP is blocking this port, I still need to check this. My router is Netgear Nighthawk R7800 AC2600. Is there anything I need to setup in Ubuntu, in the ssh_config file, to make this connection work?
14.04 networking server ssh macosx
add a comment |Â
up vote
0
down vote
favorite
I just started to experiment with ssh and port forwarding. I use ubuntu to ssh into my iMac. The iMac says to use ssh user1@host
and that works fine when I am using the same network. However, when I connect to my Ubuntu to another network, say at work, and try to ssh into my iMac with ssh -v -v -v user1@host -p 22
I get the following output:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connect to address user1@host port 22: Connection timed out
I setup my router to forward port 22 to my iMac's ip address--I'm not sure if my ISP is blocking this port, I still need to check this. My router is Netgear Nighthawk R7800 AC2600. Is there anything I need to setup in Ubuntu, in the ssh_config file, to make this connection work?
14.04 networking server ssh macosx
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I just started to experiment with ssh and port forwarding. I use ubuntu to ssh into my iMac. The iMac says to use ssh user1@host
and that works fine when I am using the same network. However, when I connect to my Ubuntu to another network, say at work, and try to ssh into my iMac with ssh -v -v -v user1@host -p 22
I get the following output:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connect to address user1@host port 22: Connection timed out
I setup my router to forward port 22 to my iMac's ip address--I'm not sure if my ISP is blocking this port, I still need to check this. My router is Netgear Nighthawk R7800 AC2600. Is there anything I need to setup in Ubuntu, in the ssh_config file, to make this connection work?
14.04 networking server ssh macosx
I just started to experiment with ssh and port forwarding. I use ubuntu to ssh into my iMac. The iMac says to use ssh user1@host
and that works fine when I am using the same network. However, when I connect to my Ubuntu to another network, say at work, and try to ssh into my iMac with ssh -v -v -v user1@host -p 22
I get the following output:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connect to address user1@host port 22: Connection timed out
I setup my router to forward port 22 to my iMac's ip address--I'm not sure if my ISP is blocking this port, I still need to check this. My router is Netgear Nighthawk R7800 AC2600. Is there anything I need to setup in Ubuntu, in the ssh_config file, to make this connection work?
14.04 networking server ssh macosx
asked May 16 at 15:14
![](https://i.stack.imgur.com/p8Lfs.jpg?s=32&g=1)
![](https://i.stack.imgur.com/p8Lfs.jpg?s=32&g=1)
d84_n1nj4
1012
1012
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I would recommend using canyouseeme.org to check if your ISP is blocking SSH.
I would also check that your iMac is getting a static IP address - otherwise, it'll change, meaning the port forward you set up will become obsolete.
I wanted to add that opening up SSH as you describe is very dangerous. You should use something to block abuse. For example, right now, I have a web server with SSH open, running fail2ban.
fail2ban works by routing IP addresses to 0.0.0.0 in iptables.
I've configured it so that if you get the password wrong twice, it blocks your IP address for a long time. The incorrect attempts must be within 24 hours of each other.
I just ran sudo iptables -L -n | grep -c 0.0.0.0
which counts how many IP addresses are blocked right now. It returned 356
, and this is on a site which barely has any visitors.
If you're opening up ports through your firewall to your home PC, bots are going to find it and break in. I don't know how you go about installing this sort of a thing in macOS, but I'd highly recommend doing so.
1
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I would recommend using canyouseeme.org to check if your ISP is blocking SSH.
I would also check that your iMac is getting a static IP address - otherwise, it'll change, meaning the port forward you set up will become obsolete.
I wanted to add that opening up SSH as you describe is very dangerous. You should use something to block abuse. For example, right now, I have a web server with SSH open, running fail2ban.
fail2ban works by routing IP addresses to 0.0.0.0 in iptables.
I've configured it so that if you get the password wrong twice, it blocks your IP address for a long time. The incorrect attempts must be within 24 hours of each other.
I just ran sudo iptables -L -n | grep -c 0.0.0.0
which counts how many IP addresses are blocked right now. It returned 356
, and this is on a site which barely has any visitors.
If you're opening up ports through your firewall to your home PC, bots are going to find it and break in. I don't know how you go about installing this sort of a thing in macOS, but I'd highly recommend doing so.
1
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
add a comment |Â
up vote
0
down vote
I would recommend using canyouseeme.org to check if your ISP is blocking SSH.
I would also check that your iMac is getting a static IP address - otherwise, it'll change, meaning the port forward you set up will become obsolete.
I wanted to add that opening up SSH as you describe is very dangerous. You should use something to block abuse. For example, right now, I have a web server with SSH open, running fail2ban.
fail2ban works by routing IP addresses to 0.0.0.0 in iptables.
I've configured it so that if you get the password wrong twice, it blocks your IP address for a long time. The incorrect attempts must be within 24 hours of each other.
I just ran sudo iptables -L -n | grep -c 0.0.0.0
which counts how many IP addresses are blocked right now. It returned 356
, and this is on a site which barely has any visitors.
If you're opening up ports through your firewall to your home PC, bots are going to find it and break in. I don't know how you go about installing this sort of a thing in macOS, but I'd highly recommend doing so.
1
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I would recommend using canyouseeme.org to check if your ISP is blocking SSH.
I would also check that your iMac is getting a static IP address - otherwise, it'll change, meaning the port forward you set up will become obsolete.
I wanted to add that opening up SSH as you describe is very dangerous. You should use something to block abuse. For example, right now, I have a web server with SSH open, running fail2ban.
fail2ban works by routing IP addresses to 0.0.0.0 in iptables.
I've configured it so that if you get the password wrong twice, it blocks your IP address for a long time. The incorrect attempts must be within 24 hours of each other.
I just ran sudo iptables -L -n | grep -c 0.0.0.0
which counts how many IP addresses are blocked right now. It returned 356
, and this is on a site which barely has any visitors.
If you're opening up ports through your firewall to your home PC, bots are going to find it and break in. I don't know how you go about installing this sort of a thing in macOS, but I'd highly recommend doing so.
I would recommend using canyouseeme.org to check if your ISP is blocking SSH.
I would also check that your iMac is getting a static IP address - otherwise, it'll change, meaning the port forward you set up will become obsolete.
I wanted to add that opening up SSH as you describe is very dangerous. You should use something to block abuse. For example, right now, I have a web server with SSH open, running fail2ban.
fail2ban works by routing IP addresses to 0.0.0.0 in iptables.
I've configured it so that if you get the password wrong twice, it blocks your IP address for a long time. The incorrect attempts must be within 24 hours of each other.
I just ran sudo iptables -L -n | grep -c 0.0.0.0
which counts how many IP addresses are blocked right now. It returned 356
, and this is on a site which barely has any visitors.
If you're opening up ports through your firewall to your home PC, bots are going to find it and break in. I don't know how you go about installing this sort of a thing in macOS, but I'd highly recommend doing so.
answered May 16 at 15:58
Tom Harris
466
466
1
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
add a comment |Â
1
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
1
1
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
Thanks for the advice, I'll look into fail2ban and use canyouseeme.org. I'll report back tonight.
â d84_n1nj4
May 16 at 16:01
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
I ended up fixing the issue. I was using the incorrect ip address when I was ssh'ing into my router. I was originally using the ip address my iMac told me to use under Remote Login. This worked when I was on the same network but not when I was on another network. I had to use the router ip address found on the router setup page. I'll leave this here since it may help someone. Now I need to find out how to configure fail2ban on Mac OS X 10.13. There seems to be very little new documentation.
â d84_n1nj4
May 17 at 12:25
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037005%2fssh-connection-timed-out%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password