The default port number for ssh is 22 is there a way to implement security by being obscure and changing the original number? So for example ssh would not be on port 22 it would be on lets say 2847.
Asked
Active
Viewed 97 times
-6
-
2Google is your friend and so is the extensive documentation that comes with your distro of choice. – user9517 Feb 24 '14 at 21:21
-
possible duplicate of [Why change default ssh port?](http://serverfault.com/questions/189282/why-change-default-ssh-port) – TheCleaner Feb 24 '14 at 21:33
-
1Just a note: do read the Wikipedia article that's the first result for "security by being obscure" in Google. – ceejayoz Feb 24 '14 at 21:57
-
@ceejayoz thanks for the note, however I don't use google/yahoo/msn but i'll look into that article thanks again – secure212 Feb 24 '14 at 22:20
-
@TheCleaner I was not aware of that but thanks. Very interesting – secure212 Feb 24 '14 at 22:21
-
@user180041 Uh... you don't use search engines? Fine, read this: http://en.wikipedia.org/wiki/Security_through_obscurity – ceejayoz Feb 24 '14 at 22:24
-
@TheCleaner -_- look into DuckduckGo – secure212 Feb 24 '14 at 22:27
-
2@user180041, you don't need to be obtuse. 'Google it', are 'Google is your friend' are just a hint **that have done a poor job at research**, not a recommendation for a specific search engine. This doesn't mean you have to use Google, [use your favorite search engine](https://duckduckgo.com/?q=change+ssh+port+number). – Zoredache Feb 24 '14 at 23:00
1 Answers
1
On most Linux system, the ssh
port is defined in file :
/etc/ssh/sshd_config
With directive :
# What ports, IPs and protocols we listen for
Port 22
Change port for that directive, let's say :
# What ports, IPs and protocols we listen for
Port 2847
And restart sshd
to apply changes :
service ssh restart
Now ssh
should listen on port 2847

krisFR
- 13,280
- 4
- 36
- 42