1826424 Members
3441 Online
109692 Solutions
New Discussion

SSH to local hosts

 
SOLVED
Go to solution
George Chechakunnil
Frequent Advisor

SSH to local hosts

Hello Gurus

I was having some issues with HP SIM and i found that if i do a

ssh 127.0.0.1 it fails even when i give the correct password.

Is there any file i need to add the local host entry for ssh?

please help
George
I am like a small boy picking up pebbles in god's vast shore of knowledge --- Sir Issac Newton
9 REPLIES 9
wasim_1
New Member

Re: SSH to local hosts

Hi George what is the output of ssh 0 or telenet 0

Regards
Safar
George Chechakunnil
Frequent Advisor

Re: SSH to local hosts

its asks for the password and i tried the root password but fails.


The authenticity of host '0 (0.0.0.0)' can't be established.
RSA key fingerprint is 41:43:5c:d9:71:bc:dd:a9:d0:0b:f5:a1:0f:22:a5:23.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '0,0.0.0.0' (RSA) to the list of known hosts.
Password:
Password:
Connection closed by 127.0.0.1
I am like a small boy picking up pebbles in god's vast shore of knowledge --- Sir Issac Newton
Heiner E. Lennackers
Respected Contributor

Re: SSH to local hosts

Hi George,

take a look at /etc/opt/ssh/sshd_config:

If PermitRootLogin is set to no, you have to change it to yes to allow root logins.

HeL
if this makes any sense to you, you have a BIG problem
shanmuhanandam
HPE Pro

Re: SSH to local hosts

Hi george,
try to put a wrong passwd in first time and type the correct passwd in second time.
check whether it is accepting or not?

regards,
shanmugam.
I am an HPE Employee

Accept or Kudo

George Chechakunnil
Frequent Advisor

Re: SSH to local hosts

hello Shan

No luck mate... I tried with a wrong password first and then the correct password . same result

Password:
Password:
Password:
root@127.0.0.1's password:
Permission denied, please try again.
root@127.0.0.1's password:
Permission denied, please try again.
root@127.0.0.1's password:
Received disconnect from 127.0.0.1: 2: Too many authentication failures for root
I am like a small boy picking up pebbles in god's vast shore of knowledge --- Sir Issac Newton
Aashique
Honored Contributor

Re: SSH to local hosts

Hi George,
Please check the file
/etc/opt/ssh/sshd_config

If PermitRootLogin is set to no, you have to change it to yes to allow root logins.

Then Please restart the sshd service.

Thanks & Regards

A. Aashique
Ralph Grothe
Honored Contributor
Solution

Re: SSH to local hosts

If it's not the PermitRootLogin directive,
as so apparently suspected by most,
look if you have a DenyUsers definition in your sshd_config, albeit this seems pretty unusual.
After any configuration changes you must send sshd a SIGHUP to make them become effective.

# vi /opt/ssh/etc/sshd_config

# kill -1 $(cat /var/run/sshd.pid)

Could it be you are running a tcp wrapper?

Please, look for error messages from sshd in syslog.log

# grep sshd /var/adm/syslog.log | tail -20
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: SSH to local hosts

For debugging purposes you could start a second sshd instance on any unused port (e.g. check with netstat -an|grep LISTEN|grep ).

Prevent the new instance from detaching from the tty, and send verbose debug output to sterr instead of to syslogd.

e.g.

# /opt/ssh/sbin/sshd -p -Dddde

From a second tty try your root login to localhost but chosen port.

# ssh -p localhost

Watch messages on by 2nd sshd occupied tty.
Madness, thy name is system administration
George Chechakunnil
Frequent Advisor

Re: SSH to local hosts

Thanks a lot.. My ssh to local host is working but my original problem of SIM not working is still givign same error

Ssh Operation failed for node:xxtcu015 SshAuthentication Failed.
Ssh Operation failed for node:xxtcu015 SshAuthentication Failed.

Any ideas?

I am like a small boy picking up pebbles in god's vast shore of knowledge --- Sir Issac Newton