My problem is : I developed successfully RSA Key based ssh login on board from system. When a client logs in for the first time, ask about private key and passphrase also which works fine. In second time login, ssh doesn't ask private key or password, directly login on board.
Client side use Ubuntu 16.04 and on board customizes Ubuntu.
First time login with below command:
ssh -i ~/.ssh/id_rsa user@board_ip
//works fine
Second time:
ssh user@board_ip
//never ask password and public key - problem
First time:
ssh user@board_ip
//not able to login without key - works fine
As per my understanding, I made a mistake in the sshd_config file on the board. I played with below settings but failed it all the time.
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#PasswordAuthentication yes
PermitEmptyPasswords no
Project requirement is secure login, mainly on ssh. To achive more security SSH password based login, we shifted to key based login. As explain above after change all configuration. SSH login require private key and password also. After logout and after sometime login again, ssh doesn't require key or password, project requirement need key and password each and everytime.