Cannot access OpenSSH server outside LAN
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I installed OpenSSH server on my router in order to perform remote maintenance and access an external drive through SFTP.
When I'm connected to LAN, everything works fine and I can access the router through both its local and external IP address, but trying to accessing it elsewhere gives 'Connection Refused' error. Port configuration shouldn't be the problem, I used a port scanner to verify that the port I specified is indeed open.
networking ssh openssh
add a comment |
I installed OpenSSH server on my router in order to perform remote maintenance and access an external drive through SFTP.
When I'm connected to LAN, everything works fine and I can access the router through both its local and external IP address, but trying to accessing it elsewhere gives 'Connection Refused' error. Port configuration shouldn't be the problem, I used a port scanner to verify that the port I specified is indeed open.
networking ssh openssh
Have you looked at the logs of the OpenSSH server? There may be lines in there that tell you why it was refused.
– QuickishFM
Mar 3 at 13:37
add a comment |
I installed OpenSSH server on my router in order to perform remote maintenance and access an external drive through SFTP.
When I'm connected to LAN, everything works fine and I can access the router through both its local and external IP address, but trying to accessing it elsewhere gives 'Connection Refused' error. Port configuration shouldn't be the problem, I used a port scanner to verify that the port I specified is indeed open.
networking ssh openssh
I installed OpenSSH server on my router in order to perform remote maintenance and access an external drive through SFTP.
When I'm connected to LAN, everything works fine and I can access the router through both its local and external IP address, but trying to accessing it elsewhere gives 'Connection Refused' error. Port configuration shouldn't be the problem, I used a port scanner to verify that the port I specified is indeed open.
networking ssh openssh
networking ssh openssh
asked Mar 3 at 11:18
TJKTJK
1
1
Have you looked at the logs of the OpenSSH server? There may be lines in there that tell you why it was refused.
– QuickishFM
Mar 3 at 13:37
add a comment |
Have you looked at the logs of the OpenSSH server? There may be lines in there that tell you why it was refused.
– QuickishFM
Mar 3 at 13:37
Have you looked at the logs of the OpenSSH server? There may be lines in there that tell you why it was refused.
– QuickishFM
Mar 3 at 13:37
Have you looked at the logs of the OpenSSH server? There may be lines in there that tell you why it was refused.
– QuickishFM
Mar 3 at 13:37
add a comment |
1 Answer
1
active
oldest
votes
It would seem a firewall/routing problem, you have verified that access to port 22 is not limited to the LAN ip range only ?
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410889%2fcannot-access-openssh-server-outside-lan%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It would seem a firewall/routing problem, you have verified that access to port 22 is not limited to the LAN ip range only ?
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
add a comment |
It would seem a firewall/routing problem, you have verified that access to port 22 is not limited to the LAN ip range only ?
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
add a comment |
It would seem a firewall/routing problem, you have verified that access to port 22 is not limited to the LAN ip range only ?
It would seem a firewall/routing problem, you have verified that access to port 22 is not limited to the LAN ip range only ?
answered Mar 3 at 12:22
DanfossiDanfossi
465
465
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
add a comment |
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
I agree - it may be that the default (or current) setting of the OpenSSH server is to allow LAN connections only. However, this means that it shouldn't work if connecting using the external address, despite being inside the LAN as it will still go through the ISP - effectively connecting to it externally...
– QuickishFM
Mar 3 at 13:37
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
@QuickishFM, the fact that you connect to external address doesn't mean the connection leaves the router, goes to ISP and circles back. Router will notice its own IP address and terminate location locally.
– Tomek
Mar 3 at 13:50
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
Oh, I see. This is different to some implementations that I have personally experienced, so I assumed as such. Thanks for clarification - i think this further supports the fact that either some ports are not forwarded correctly or the openSSH server itself declines connections from external addresses.
– QuickishFM
Mar 3 at 13:58
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410889%2fcannot-access-openssh-server-outside-lan%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
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
Have you looked at the logs of the OpenSSH server? There may be lines in there that tell you why it was refused.
– QuickishFM
Mar 3 at 13:37