Connecting to remote server via SSH issue
I have setup ssh key password less login but while doing ssh to the remote server from auth server through the another user [abc] then it shows below error...
Auth Server error: permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
Remote Server error: sshd[3320943]: Invalid user
using root user it's working but using another user xyz then it's shows above error...
I have created shortcut for remote server login...
root@auth: ssh remoteserver
[successful]
xyz@auth: ssh remoteserver
permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
xyz@auth: ssh root@remoteserver
[successful]
It's only login if I use root@ from the user not directly remote server name...
Also, I need as the remote server login should happened from the xyz user and xyz whatever will fire commands on remote server which history should save on Auth server in his bash history file...
How to do that?
-
SSH keys are installed per user, so just because you installed a key for root that key does not apply to user xyz. You would need to add the same key to /home/xyz/.ssh/authorized_keys as well to use the same key for this other user. 0 -
Is the user in the wheel group? 0 -
Yes. I have added xyz user in wheel group as well as created new ssh key for that xyz user and added that on remote server but still it's showing me Permission denied (publickey,gssapi-keyex,gssapi-with-mic). error... However, if I do ssh from xyz user like: ssh root@remoteserver then it works but not like: ssh remoteserver -=-=-=-=- [xyz@authserver .ssh]$ssh root@remoteserver Enter passphrase for key '/home/xyz/.ssh/id_rsa': Last login: Mon Jun 3 11:14:47 2019 from x.x.x.x root@remoeserver [/tmp]# -=-=-=-=- Also, one thing, I want when I do SSH from xyz user to remoteserver then remoteserver should show xyz user not root... like... -=-=-=-=- [xyz@server .ssh]$ssh root@remoteserver Enter passphrase for key '/home/xyz/.ssh/id_rsa': Last login: Mon Jun 3 11:14:47 2019 from x.x.x.x xyz@remoeserver [/tmp]#whoami xyz xyz@remoeserver [/tmp]# -=-=-=-=- and whatever I will fire commands through xyz user on remoteserver then history should save on Auth server under xyz user bash history... 0 -
Hello @OnlySachin7, Can you verify if the AllowUsers directive is enabled in /etc/ssh/sshd_config on the remote server you are connecting to via SSH? Thank you. 0 -
Hello @OnlySachin7, Can you verify if the AllowUsers directive is enabled in /etc/ssh/sshd_config on the remote server you are connecting to via SSH? Thank you.
Thanks for the reply Michael. Yes. I have tried that as well but not working. Actually when I am doing ssh to remote server from 'xyz' user like ssh remote then it shows error on remote server in secure logs as invalid xyz user.0 -
Yes. I have tried that as well but not working.
Hello @OnlySachin7, Can you confirm the step-by-step instructions for the specific change you made related to the AllowUsers directive? Thank you.0
Please sign in to leave a comment.
Comments
6 comments