Secure Your VPS SSH - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: VPS Protection (https://post4vps.com/Forum-VPS-Protection) +--- Thread: Secure Your VPS SSH (/Thread-Secure-Your-VPS-SSH) |
Secure Your VPS SSH - youssefbasha - 11-01-2017 Hello, I will tell you how to secure your vps ssh by changing port. 1st. Login with SSH (root) 2nd. Type this command nano /etc/ssh/sshd_config
You will get this if you are using CentOSGNU nano 2.3.1 File: /etc/ssh/sshd_config
Changw the port line to # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32$ # This is the sshd server system-wide configuration fi$# sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/usr$ # The strategy used for options in the default sshd_co$# OpenSSH is to specify options with their default val$# possible, but leave them commented. Uncommented opt$# default value. # If you want to change the port on a SELinux system, $# SELinux about this change. # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER # #Port 22 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: [ Read 139 lines ] ^G Get He^O WriteO^R Read F^Y Prev P^K Cut Te^C Cur Pos^X Exit ^J Justif^W Where ^V Next P^U UnCut ^T To Spel Port 4/5NUMBERS HERE
And remove the #EX: Port 9988
And then click CTRL + OAnd press Enter to save the directory And then type this command service sshd restart
And for Ubuntu do all of these steps but when you want to save doservice ssh restart
Now reboot or just exit from PuTTy and change the port to 9988 (the changed port) and re connect Reply and rate! RE: Secure Your VPS SSH - Dudi - 11-02-2017 Very good tutorial, thanks, but I think you should mention that we can choose other port than 9988 too. RE: Secure Your VPS SSH - humanpuff69 - 11-02-2017 (11-02-2017, 10:48 AM)Dudi Wrote: Very good tutorial, thanks, but I think you should mention that we can choose other port than 9988 too. in fact you can use any port as long as it is doesnt used by other program . the range is from 0 to 65535 . that is lot of choice . i reccomend you use the 5 digit port just to make it more secure RE: Secure Your VPS SSH - youssefbasha - 11-04-2017 (11-02-2017, 11:19 AM)humanpuff69 Wrote: in fact you can use any port as long as it is doesnt used by other program . the range is from 0 to 65535 . that is lot of choice . i reccomend you use the 5 digit port just to make it more secure Yes, but this is a simple tutorial and i mentioned this, u can use number in 9*** to be secured RE: Secure Your VPS SSH - Conan - 11-18-2017 This won't really secure your VPS. Port scanners exists. You should instead use Key Authentication exclusively. RE: Secure Your VPS SSH - OldMeister - 11-18-2017 why to change port? i dont think someone knows the ip of my vps... and what is the default port of SSH? RE: Secure Your VPS SSH - oraldavid - 11-18-2017 (11-18-2017, 01:31 PM)OldMeister Wrote: why to change port? i dont think someone knows the ip of my vps... and what is the default port of SSH? The default SSH Port is 22. They can know your vps ip by simply knowing your hostname. RE: Secure Your VPS SSH - humanpuff69 - 11-19-2017 (11-18-2017, 01:45 PM)oraldavid Wrote: The default SSH Port is 22. they can get it just by getting your domain ip and pinging to it by pinging to it they can get your server ip address . no matter what you host on it (web , game server , etc) and then they can brute force the login RE: Secure Your VPS SSH - arsalahmed786 - 11-22-2017 Since someone said on my forum "I'll DDoS you" well i didn't get any DDoS yet. but i'm worrying about my VPS it's unsecured. thanks to @youssefbasha for this tutorial. i'll change port. can anyone create new tutorial or suggest me how can i 100% secured my VPS from anyone else i mean attack etc. RE: Secure Your VPS SSH - oraldavid - 11-22-2017 (11-22-2017, 11:50 AM)arsalahmed786 Wrote: Since someone said on my forum "I'll DDoS you" well i didn't get any DDoS yet. but i'm worrying about my VPS it's unsecured. If u want to secure your vps add firewall options to the user ip, as u are admin. And create range iptables in it. |