Trying to become another user on Linux/getting error logging to server – su: cannot ser user id: Resource temporarily unavailable
emerson@linux:~ $ sudo su – oracle
sudo password for emerson:
su: cannot ser user id: Resource temporarily unavailable
The number of processes for the user must have exceeded the soft limit. Change it to a higher number
root@linux:~ # vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
root@linux:~ # ssh firstname.lastname@example.org
Received disconnect from 10.32.36.45: 2: Too many authentication failures for emerson
The problem was that my server 10.32.36.45 tried to authenticate using a method and then gave up.
To fix it, edit file /etc/ssh/sshd_config and increase MaxAuthTries. On my server was just trying 1 time.
root@linux:~ # vi /etc/ssh/sshd_config
You can try to not use ssh keys to login but I commented the parameter to restore the default value and restarted the sshd service
root@linux:~ # service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
SSH connection error – no supported authentication methods available (server sent keyboard-interactive)
Edit /etc/ssh/sshd_config and set the parameter PAMAuthenticationViaKBDInt to yes
# To disable tunneled clear text passwords, change PasswordAuthentication to no.
# Use PAM via keyboard interactive method for authentication.
# Depending on the setup of pam.conf(4) this may allow tunneled clear text
# passwords even when PasswordAuthentication is set to no. This is dependent
# on what the individual modules request and is out of the control of sshd
# or the protocol.
I was receiving the error message Received disconnect from host: 2: bind: Permission denied when trying to connect using ssh.
Received disconnect from 172.16.36.110: 2: bind: Permission denied
root@linux:~ # rpm -q openssh
root@linux:~ # cat /etc/*release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2
OpenSSH on Solaris 6, 7 and 8 error message: Couldn’t connect to PRNGD socket “/var/spool/prngd/pool”: Connection refused
If you tried to start sshd on Solaris and appeared an error message saying it couldn’t connect to PRNGD socket, you need to start this daemon first.
root@solaris6:/ # /etc/init.d/sshd start
Couldn’t connect to PRNGD socket “/var/spool/prngd/pool”: Connection refused
couldn’t read entropy commands file /usr/local/etc/ssh_prng_cmds: No such file or directory
ssh-rand-helper child produced insufficient data
Run /etc/init.d/prngd start and then start ssh again
root@solaris6:/ # /etc/init.d/prngd start
root@solaris6:/# /etc/init.d/sshd start
The daemon should be running now
root@solaris6:/ # ps -ef | grep ssh
root 19359 1 0 10:00:08 ? 0:00 /usr/local/sbin/sshd
root 19376 18089 0 10:00:13 pts/1 0:00 grep ssh
After you set up the public key authentication in any Unix server, if it keeps asking for your password even after you put your public key in the ~/.ssh/authorized_keys file you need to check the file permissions.
To fix this problem, check if the owner and the file permission is set right on:
Home directory (700)
.ssh directory (700)
authorized_keys file (600)