Operating System - HP-UX
1753770 Members
4838 Online
108799 Solutions
New Discussion юеВ

login works via ssh but not via telnet

 
SOLVED
Go to solution
Brett Simpson
Frequent Advisor

login works via ssh but not via telnet

I created a user account and it works when loggin in via ssh. It doesn't work via telnet. I also just realized that root is accessible via ssh but not telnet. Any ideas?

Thanks
24 REPLIES 24
Sunny123_1
Esteemed Contributor

Re: login works via ssh but not via telnet

Hi

Check your /etc/inetd.conf file and look for telnet option i think it has # mark.

Also check /var/adm/inetd.sec file and look any telnet deny is there or not

Hope this help.

Regards
Sunny
Basheer_2
Trusted Contributor

Re: login works via ssh but not via telnet

This is good.

Usually now a days sysadmins disable all the traditional insecure services to secure the system.

sunny has given all the correct steps.

Basheer_2
Trusted Contributor

Re: login works via ssh but not via telnet

if you still need it.

follow Sunny's steps and also there should be entries in the /etc/services file.
Steven E. Protter
Exalted Contributor

Re: login works via ssh but not via telnet

Shalom,

Check inetd.conf

Probably telnet is disabled.

netstat -an | grep ":23 "

See if telnet is listening.

If it is, see if inetd.sec is blocking telnet or TCP wrappers configuration is interfering.

Check logs /var/adm/syslog/syslog.log

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Brett Simpson
Frequent Advisor

Re: login works via ssh but not via telnet

I've checked /etc/inetd.conf and there are no commented lines regarding telnet. /var/adm/inetd.sec does not exist on this server.

I can also telnet to other non-root users without a problem.
James R. Ferguson
Acclaimed Contributor

Re: login works via ssh but not via telnet

Hi Brett:

> I can also telnet to other non-root users without a problem.

Look for your '/etc/securetty' file. It undoubtedly exists and has a line with the word "console" in it. The presence of this file inhibits root logins to the listed devices.

Regards!

...JRF...
Brett Simpson
Frequent Advisor

Re: login works via ssh but not via telnet

Telnet is not disabled at all. I can connect, just get a reply that login is incorrect. This only happens on root and certain other non-root users.
Brett Simpson
Frequent Advisor

Re: login works via ssh but not via telnet

James,
Shouldn't that entry in /etc/securetty also disable root login via ssh? I can login to the root account via ssh. The console entry is in /etc/securetty, but doesn't stop login from ssh. I also commented it out and still the same results.

That also doesn't really explain why I can login via telnet to some non-root users, but can't with others.

This is also a system that I just inherited, so I didn't set it up.
James R. Ferguson
Acclaimed Contributor
Solution

Re: login works via ssh but not via telnet

Hi (again) Brett:

> Shouldn't that entry in /etc/securetty also disable root login via ssh? I can login to the root account via ssh.

No, 'ssh' uses 'PermitRootLogin' in '/opt/ssh/etc/sshd_config'. Change it to "no" (and remove the comment mark) and restart the 'sshd' daemon.

Regards!

...JRF...