Operating System - HP-UX
1822168 Members
3849 Online
109640 Solutions
New Discussion юеВ

What does "is port 22 open on your system mean?"?

 
SOLVED
Go to solution
Stuart Abramson_2
Honored Contributor

What does "is port 22 open on your system mean?"?

One of our network people asked me:

.."Is port 22 (ssh) open on your system?"

I have had this trouble with them in the past. What does he mean?

Apparently the Windows admins can "disable" a port, so that Windows won't send/respond on that port.

The network people can also disable passage of data on a port to/from a server in the firewall.

But I have no idea how to do that on HP-UX.

To me a port is a port, and if we define entries in /etc/services and /etc/inetd.conf, then someone will respond to it.
10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

If you have SSH installed on your system and the port defined in /etc/services and /etc/inetd.conf then I guess it could be considered "open".

If you do not need it, comment it out of /etc/inetd.conf, do an 'inetd -c' and it could then be considered "closed".
Michael Schulte zur Sur
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Hi,

strange question. ssh should be the preferrable method of conneting to hosts, so why would your network guy have it closed?
At any port ther must someone to listen, otherwise the port is dead. /etc/inetd.conf is important. I wonder, if services is important at all.

greetings,

Michael
Stuart Abramson_2
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Where does one get "ssh" from?

Is it an HP product, or is it from one of those download sites?
Mark Greene_1
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Port 22 is used for ssh. Unless you have an application specifically listening on port 22, your system will ignore traffic on that port without sshd running.

I don't know if there is a software firewall available for HP-UX. You can take ports out of /etc/services, but that doesn't turn off the port in the strictest sense.

mark
the future will be a lot like now, only later
Patrick Wallek
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Pete Randall
Outstanding Contributor

Re: What does "is port 22 open on your system mean?"?

Dave Hutton
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Like said above, ssh is what quite a few people are moving to.

Heres where you can download the precompiled stuff:
http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/openssh-3.7.1p2/

Theres windows clients you can download too like puty and ftp clients like WinSCP.

Dave
Sridhar Bhaskarla
Honored Contributor
Solution

Re: What does "is port 22 open on your system mean?"?

Hi,

Do a 'telnet localhost 22' and if you see any output other than 'connection refused' then this port is open. Otherway is to do 'netstat -an |grep ".22" |grep LISTEN' can show you if the tcp port at 22 is opened or not. This is used by ssh as already mentioned.

Having the entry in /etc/services doesn't necessarily mean the port is open. Not having an entry in /etc/inetd.conf doesn't mean the port is not opened. Most of the SSH installations are standalone servers instead brokered by inetd.

I have seen security admins running a scan on the system and report all the open ports as security vulnerabilities without paying much attention to what each port does. This may be one of such cases.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Stuart Abramson_2
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Thanks all.

We don't have SSH installed, nor do we have anybody listening/responding on port 22.

I guess they were asking because they want to move in the "SSH" direction..

Stuart
Thomas Bianco
Honored Contributor

Re: What does "is port 22 open on your system mean?"?

Figured I should chime in about windows ports.

Windows does not have a way to close ports any more then any of the UNIXI. Ports can be in one of 3 states: open, closed, or drop. Open ports mean the system has some kind of process watching this port and responding. Closed means there is no application watching this port, so the system sends NACK (or RST, I forget)*. Drop is a special case where an application (or the system) is specifically ignoring a port and does not send any response, as if the system did not exist.

Unix system actually have an easier time of port management, as there are tools like netstat that function... strangely... under windows.

Your windows guy is asking if you have the SSH (happens to be port 22) service (deamon, etc..) accepting connections.

*NACK= Negative ACKnowledgement; RST = ReSeT connection.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.