SSH enable, Telnet disable ...

Hi...

How do I enable SSH and disable telnet..

Also - is there anything special I need to do to ensure that a new user can use ssh and su but not telnet?

Adel

you can disable telnet in /etc/services file . Just put a # comment at the telnet line. Then restart or kill -HUP initd
you can also comment out telnet line in the inetd.conf file.

It depends on the version of Solaris, Solaris 10 is different from its predecessors.

Hi ,

Thanks for your help

My Solaris version is 9

in solaris 9 ssh is enabled per default. to disable telnet follow ghostdog74 instructions. if you want to enable the root login per ssh edit the following line in your /etc/ssh/sshd_config and restart the ssh daemon. (or pkill -HUP sshd)

PermitRootLogin no (<-- to yes)

regards pressy

Thaaaanks for your help ,,,,

Last thing : How to change the community string , it is "public" now! I want to change it.

Regards

I saw the previous post to disable. i am a complete newbie. how do i get to the file to edit, can i edit with the system running in production, if not what mode should i be in. I'm just learning this and got a security directive to turn off telnet asap and i need pretty much the exact step by step.i would appreciate all help

Thanks

You can stop telnet while the server's running.

  1. Edit /etc/inetd.conf (vi /etc/inetd.conf)

  2. Find the entry for telnet (/telnet[enter])

If there's a "#" in front of the entry then you're done. Otherwise continue:

3 Put put a hash mark in front of the line (i#[esc])

  1. Save the file (:wq!)

  2. Restart the inetd process (kill -HUP `ps -e | grep inet | awk '{print $1}'`) (the ones around the whole statemet after HUP are reverse ticks, the lower key where tilde (~) is on your PC keyboard. The ones in the awk section are single quotes.)

  3. Test the connection (telnet localhost)

  4. Profit!

Carl

thank you BOFH

before I exercise your command the un-commented line is
Telnet streams tcp6 nowait root /usr/sbin/in.telnetd %A in.telnetd
is this the line to comment out.

also when I did your inital entry to view the file it will not allow me to perform the edit.

Thanks

That is the correct line to be commented out. You do need to be root in order to edit the file and to restart inetd.

Carl

BOFH, thank you

I am in as root. at the end of the file there are ~ lines down the left edge of the file. and i cannot make an entry,

any ideas

Thank you

The tilde's are fine. It just means you're at the end of the file. Find the telnet line ('/' to begin search and 'telnet' for what to search for. hit enter to jump to the line) and press the letter 'i' which means "insert". Then hit the hash key (#). That will insert the # in front of the telnet line. Hit escape to return to command mode. Then hit colon ":" and type wq! (which means "write, quit, force"). That will return you to your prompt.

Carl

A little hitch in the database. Posting this so you know there was a reply :slight_smile:

Carl

Thank you BOFH
I performed your command and it all seemed to work

Afeter i did the kill -HUP `ps -e | grep inet | awk '{print $1}'` the prompt went back to > . is that the end of the process.

I exited out of the xterm screen and went back in and executed the vi command to see if the line was commented out and indeed it was.

If indeed this is the completion of the process, I greatly appreciate your kind help.

Yep, that should take care of it. You might test it (my step 6) and attempt to telnet to the server. If you get a login prompt then something didn't work as expected. If you did it all correctly, you should get:

$ telnet localhost
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Or something like that (that's from my Linux box) and all's good.

Carl

i have solaris 10
i want how to configure solaris 10 to be able to connect via ssh
thanks in advance