Tuesday, October 27, 2009

Re: [LINUX_Newbies] Re: protecting the root user in Centos

 

On Tue, Oct 27, 2009 at 12:43, Scott <scottro@nyc.rr.com> wrote:

> To change the port by the way, look for the commented line that says
> Port 22. Note that in sshd_config (if you didn't already know this,
> which you may have) a commented line usually means a default that IS in
> action.  So, you can either leave Port 22 commented and add a line or
> uncomment it and change it to say 7032. (First do grep 7032
> /etc/services)  When nothing comes back, I know that 7032 isn't being
> used for anything.  Now, it should read, instead of #Port 22
> Port 7032

Would "netstat -an |grep $PORT" not be more appropriate?
/etc/services is IIRC, more a reference and not a list of active
ports... for example:

telnet 23/tcp
telnet 23/udp

NONE of my systems even has a telnet daemon installed, but
/etc/services for each system includes the descriptor for the accepted
telnet port.

netstat will at least tell you what is actually running on the system...

For example, you choose port 7032 as a random high number port. And
it's not listed in /etc/services as being used by anything (at least
not assigned by IANA)... but what if you have a backup program or a
system monitoring program that is using port 7032 and ISN'T listed in
/etc/services?? now you're trying to run both sshd and $PROGRAM on
port 7032 which could make some bad things happen.

Just curious...

--

Mike Ditka - "If God had wanted man to play soccer, he wouldn't have
given us arms." -
http://www.brainyquote.com/quotes/authors/m/mike_ditka.html

__._,_.___
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
Recent Activity
Visit Your Group
Give Back

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

No comments:

Post a Comment