arrow_upward

Pages (3):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Secure Your VPS SSH
#1
Hello, 
I will tell you how to secure your vps ssh by changing port. 
1st. Login with SSH (root) 
2nd. Type this command 
Terminal
nano /etc/ssh/sshd_config
You will get this if you are using CentOS
Terminal
GNU nano 2.3.1  File: /etc/ssh/sshd_config           
#       $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
Changw the port line to 
Terminal
Port 4/5NUMBERS HERE
And remove the #
EX:
Terminal
Port 9988
And then click CTRL + O
And press Enter to save the directory
And then type this command
Terminal
service sshd restart
And for Ubuntu do all of these steps but when you want to save do
Terminal
service ssh restart
Now reboot or just exit from PuTTy and change the port to 9988 (the changed port) and re connect Smile
Reply and rate!
#2
Very good tutorial, thanks, but I think you should mention that we can choose other port than 9988 too.
#3
(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
Terminal
humanpuff69@FPAX:~$ Thanks To Shadow Hosting And Post4VPS for VPS 5
#4
(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
#5
This won't really secure your VPS. Port scanners exists.

You should instead use Key Authentication exclusively.
http://FreeVPS.club - Free VPSs!
#6
why to change port? i dont think someone knows the ip of my vps... and what is the default port of SSH?
Thank you Post4vps and BladeNode for vps 6!!!
#7
(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.
#8
(11-18-2017, 01:45 PM)oraldavid Wrote: The default SSH Port is 22.
They can know your vps ip by simply knowing your hostname.

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
Terminal
humanpuff69@FPAX:~$ Thanks To Shadow Hosting And Post4VPS for VPS 5
#9
Since someone said on my forum "I'll DDoS you" well i didn't get any DDoS yet. Big Grin 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.
Terminal
Best Regards,
Global Moderator of Post4VPS 

#10
(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. Big Grin 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.

If u want to secure your vps add firewall options to the user ip, as u are admin.
And create range iptables in it.
Pages (3):


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post

person_pin_circle Users browsing this thread: 2 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting