Changing listening ports with openSSH
i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?
PS: i'm a complete beginner to linux :)
*Running on Ubuntu 18.04LTS
networking server ssh
add a comment |
i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?
PS: i'm a complete beginner to linux :)
*Running on Ubuntu 18.04LTS
networking server ssh
Are you running thenccommand with the loopback address127.0.0.1as shown in the guide you linked? from where are you running the command?
– steeldriver
40 mins ago
@steeldriver no,I'm using the local one and I'm running it from /home
– Stelios Papamichail
29 mins ago
add a comment |
i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?
PS: i'm a complete beginner to linux :)
*Running on Ubuntu 18.04LTS
networking server ssh
i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?
PS: i'm a complete beginner to linux :)
*Running on Ubuntu 18.04LTS
networking server ssh
networking server ssh
asked 52 mins ago
Stelios PapamichailStelios Papamichail
12
12
Are you running thenccommand with the loopback address127.0.0.1as shown in the guide you linked? from where are you running the command?
– steeldriver
40 mins ago
@steeldriver no,I'm using the local one and I'm running it from /home
– Stelios Papamichail
29 mins ago
add a comment |
Are you running thenccommand with the loopback address127.0.0.1as shown in the guide you linked? from where are you running the command?
– steeldriver
40 mins ago
@steeldriver no,I'm using the local one and I'm running it from /home
– Stelios Papamichail
29 mins ago
Are you running the
nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?– steeldriver
40 mins ago
Are you running the
nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?– steeldriver
40 mins ago
@steeldriver no,I'm using the local one and I'm running it from /home
– Stelios Papamichail
29 mins ago
@steeldriver no,I'm using the local one and I'm running it from /home
– Stelios Papamichail
29 mins ago
add a comment |
1 Answer
1
active
oldest
votes
sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.
sudo service sshd restart
is one way to make this happen. Doing this will drop all current ssh sessions.
add a comment |
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
});
}
});
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%2faskubuntu.com%2fquestions%2f1119981%2fchanging-listening-ports-with-openssh%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
sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.
sudo service sshd restart
is one way to make this happen. Doing this will drop all current ssh sessions.
add a comment |
sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.
sudo service sshd restart
is one way to make this happen. Doing this will drop all current ssh sessions.
add a comment |
sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.
sudo service sshd restart
is one way to make this happen. Doing this will drop all current ssh sessions.
sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.
sudo service sshd restart
is one way to make this happen. Doing this will drop all current ssh sessions.
answered 22 mins ago
waltinatorwaltinator
22.4k74169
22.4k74169
add a comment |
add a comment |
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.
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%2faskubuntu.com%2fquestions%2f1119981%2fchanging-listening-ports-with-openssh%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
Are you running the
nccommand with the loopback address127.0.0.1as shown in the guide you linked? from where are you running the command?– steeldriver
40 mins ago
@steeldriver no,I'm using the local one and I'm running it from /home
– Stelios Papamichail
29 mins ago