Comments - MONyog ssh authentication using key
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
You do not have share your private key file. You need to have the private key file on the machine from which you are trying to connect to the remote machine You just need to have/share the public key file intruder to connect to the server.
You may also refer this documentation that will help you with understanding and setting up SSH >> https://www.google.com/url?q=https%3A%2F%2Fwww.digitalocean.com%2Fcommunity%2Ftutorials%2Fhow-to-configure-ssh-key-based-authentication-on-a-linux-server&sa=D&sntz=1&usg=AFQjCNFqzIwxFcwM6An3Gu9U22BvROpnMg
Are you trying to SSH to the machine using the password or using the key? Also try connecting from MONyog to the server using the password based authentication and verify if you are able to connect.
I am able to connect using the password but not through the key authentication
Seems like there could be some issue with the key files that you are using. Can you try creating a new SSH key by using the ssh-keygen utility.
On your local computer, generate a SSH key pair by typing,
and generate the key pair and also specify the file location to save the file. By default the keys will be stored in /.ssh directory. The private key will be called id_rsa and the associated public key will be called id_rsa.pub.
You may refer the below doc that will help you in creating the SSH key >> https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server
Please note, you don’t have to share the private key file. You just have to need the private key file in the machine from which you are trying to connect to a remote machine.
I created a new ssh key pair itself.. The error is Failed to connect to SFTP: SshConnectAuthorize: Could not get private key -- Access denied. Authentication that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Please ensure that you are entering the IP address of the machine where the SSH server is running in the ‘SSH host’ field and enter the SSH username to access the SSH server (not of the MySQL server) in the ‘SSH username’ field.
This is an authentication error. Please make sure that you have entered the correct SSH keys with the required file permission to the key file. We have our FAQ which says how to resolve this issue, here >> http://monyogkb.webyog.com/article/132-authentication-problem-with-key-authentication
I have checked the permissions and also checked if all the parameters are correct. but still i am getting the same error!!
Please follow the below steps:
1) Edit PasswordAuthentication line in /etc/ssh/sshd_config to "PasswordAuthentication no" to force RSA auth
2) Change the path for the file “authorized_keys” to some other directory like “/etc/ssh/user/authorized_keys”
3) Make the corresponding change in the “sshd_config” file, and change the value for “AuthorizedKeysFile” to AuthorizedKeysFile = /etc/ssh/user/authorized_keys
4) Restart sshd service (sudo service sshd restart)
Please tell us if this fixed the issue.
This doesnt solve the problem!!
Can you please tell what error do you get now.
Failed to connect to SFTP: SshConnectAuthorize: Could not get private key -- Access denied. Authentication that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
The problem got solved...Thanks!!
Could you tell us what was the solution to the issue here?
Just curious to know what was the issue and how did you get it solved.