Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I find out the list of all services running on my computer that might give access to hackers to log in to my computer?

One day I looked at my /var/log/auth.log from my computer and I discovered there had been several ssh login attempts and that ssh server was installed in my computer. But I couldn't remember me installing ssh server on this computer. I must have installed some package that depends on ssh package. Made me wonder what other services is running in this computer that I don't know of.

share|improve this question
2  
The ssh server shouldn't be a dependency of anything. Most distros install it by default though. –  theotherreceive Aug 29 '09 at 21:25
add comment

5 Answers 5

up vote 2 down vote accepted

The services need not be running at the time you do your check in order to present a security risk. I'd recommend using a port scanning tool like Nessus or nmap (from an outside machine) to see what ports are open. Then you can look in /etc/services and /etc/xinetd.d to figure out which services are associated with the open ports, and decide whether they can be turned off or blocked.

share|improve this answer
1  
+1 best way is to nmap your machine and see what ports are open. –  theotherreceive Aug 29 '09 at 21:25
add comment

netstat -lp will give you a list of running servers, along with their pid.

share|improve this answer
    
Note that you may want to run that with sudo netstat -lp or as root. Otherwise the process ID info may not be there. –  keithosu Aug 30 '09 at 3:28
add comment

socklist (if installed) - or a portscan from outside (with nmap)

share|improve this answer
add comment

netstat -lp is best way get info who got login to ur server or systemlink text

same good way to block all.

share|improve this answer
add comment

What distro?
You may be able to use a distro specific built in command to determine a bit more.

Exapmle on CentOS / Redhat: chkconfig --list | grep ":on"

will provide you with a listing of services that are up and running and their respective run level.

You could also nmap yourself to see what is listening, in addition to all the excellent netstat suggestions above...

share|improve this answer
    
I'm using Ubuntu 8.10. –  RamyenHead Aug 30 '09 at 14:40
    
Looks like the service command is what you may be looking for here is a link: ubuntugeek.com/… ;-) –  ForgeMan Aug 31 '09 at 0:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.