if you want to know how to change your default ssh port from 22 read this page it will show you what you need to do to change the default 22 ssh port to any other port you want

first be sure to login as super user or root,

now, before you change anything its always better to make a back up of the original file. so lets make a backup with this shell command:

cp /etc/ssh/sshd_config /etc/ssh/sshd_config-bk

now that you have a backup you can edit the ssh deamon configuration file. i am going to be using nano as my text editor. alot of people use VI - you can use whatever text editor you want, i like using nano because its very simple for me to use. so i send this command:

nano /etc/ssh/sshd_config /etc/ssh/sshd_config-bk

when you open the ssh configuration file you will see something like this:



# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::



all you have to do is change this:

#Port 22

to this
#Port 8852

* NOTE: i am using 8852, but you can use whatever port you want in the range from 1024-9999

hope that helps