ABHIONLINUX
Site useful for linux administration and web hosting

2011/05/08

How to check open ports in linux


nmap -sS -O 127.0.0.1


Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-05-08 16:49 CEST
Interesting ports on server.abhi.com (127.0.0.1):
Not shown: 1660 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
25/tcp   open  smtp
53/tcp   open  domain
80/tcp   open  http
106/tcp  open  pop3pw
110/tcp  open  pop3
111/tcp  open  rpcbind
143/tcp  open  imap
443/tcp  open  https
465/tcp  open  smtps

Device type: general purpose
Running: Linux 2.4.X|2.5.X|2.6.X
OS details: Linux 2.5.25 - 2.6.3 
Uptime 95 days

Nmap run completed -- 1 IP address (1 host up) scanned in 2.341 seconds

2011/05/07

How to reset sshd config using WHM

In somecases your ssh config may have corrupted or ssh port may have blocked in the server due to mistake. In such cases, you can reset the sshd_config from whm.
Login to your whm, then you need to access the URL given below in your browser. Remember to replace the $IPADDRESS with your IP address. This will reset the ssh port to 22.


http://$IPADDRESS:2086/scripts2/doautofixer?autofix=safesshrestart