ssh "Permission denied (publickey)"
If I try to connect to 192.168.1.100 server, I get:
Code:
martin@desktop:~> ssh -v 192.168.1.100 Code:
debug1: Authentications that can continue: publickey |
Have you generated the public and private ssh key pair for your system? If the server is configured to use public key authentication, you will need to take your public key and place it on the server on the configured location.
|
ssh
If you have no direct access to this server, you wil have to provide your public key to the SYSADM staff that HAS access and ask them to install it so that you can access the account. While there, they should check the ownership and permissions of the account home, ~/.ssh folder, and files in ~/.ssh. If the permissions are wrong, ssh will refuse the connections: but the error generated is very clear about WHY and we are not seeing that.
To answer that question: yes it does appear that the server is set to allow access by secure key only. |
SSHD config needs to be changed
Somehow the password based authentication has been diabled on the connecting server.
Here is the deal -- Step 1 : sudo vim /etc/ssh/sshd_config Step 2 : find PasswordAuthentication .... infront of that change 'no' to 'yes' Step 3 : sudo service ssh restart (Restart the SSHD server) Thats it you can now log in to this server from any machine using user passwords |
-Enter ssh-keygen command.
-Asks where to save the keys -Passphrase will allow you to secure the private keys. -Keys are generated in /root/.ssh/ -id_rsa is private key -id_rsa.pub is a public key -Copy the public key to the next server which you want to login to your current server without password. Let's say server A to server B. - Enter command Ssh-copy-id -i .ssh/id_rsa.pub [from server A] root @192.168.0.x[server B] -This ssh-copy-id will take this public key location and name of public key by default Now you will be able to login. |
well duh!
so simrika, I take it you did not read the thread before posing?
OP cannot ssh to the server, so ssh-copy-id is not going to work either. |
ok I think you need to have a username infront of your server's ip address. It should be ssh username@ip address.
|
Quote:
1. are you on the same subnet, in other words are you in that LAN? 2. is the UID from your workstation the same UID you are attempting to connect to on the server? 3. the standard process for using ssh is as follows: Code:
$ ssh <remote_user>@<IP> 4. are you able to successfully ssh in without using public keys? 5. have you verified the permissions on both your system and the remote systems /home/remote_user/.ssh directory and files? read the links in my sig for further details. |
All times are GMT -5. The time now is 02:17 AM. |