Jump to content

SSH KEYS not accepted


aian

Recommended Posts

Armbianmonitor:

Hi all,

I am trying to add SSH Keys to an HC1.

The commands I am using are:


 

sudo mkdir ~/.ssh

sudo chmod 700 ~/.ssh

sudo nano ~/.ssh/authorized_keys

 

Then I select all the PUBLIC key from PuTTy Gen and copy/paste it on the file above, close and save the file.

 

sudo chmod 600 ~/.ssh/authorized_keys

sudo chown -R $(whoami):$(whoami) ~/.ssh/

sudo reboot

 

I then try to SSH with PuTTy and SSH keys. Immediately I get an error saying "Server refused our key" and then it asks me for my normal password as a user.

Any idea what I am doing wrong?

 

Edited by aian
Link to comment
Share on other sites

cd ~
mkdir -p .ssh
cd .ssh && nano authorized_keys

Put a key in there like

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAABAEAg2gnuBk/z/8aG333k1bQV8a08LNzjyrUos8/eftKMxCRLpvYOlrkkLxffd7cNJUCHOP9flRx8qlyMbrkFLqBvVXmnRcTJiGZujFGO6NIkcploGCM7ai9mVECrjOUfSzl7Psdq4F+XXYyXeJIgPuCeFqtKU53wGEqgeO+vWb7ZgssgFBxc6iPudHiEpvnPAUN32YDoEORCYEwvM59+p58mRkooyYsgiej4D8Jibh+rCncARkfl48tilTkwH4qB2NbVHvqexUO7A9Wk6RYG2az99cenc24HWihnhLDjA4N4LP3Xfm57wYzNZZ1MPDYfQYgtK5/8MJCx1MQOTLb/lpjvNhXF+XLSontGb2VZUW8ZRSRYlWxwvy/JDPoPlcpQ/itbHdeqkekqpRoPvCZBLZy9odqDdOoLx090xFE+vUGRrNlhIEub+6KhCj11g+bhMyoO2QV/i4P7ff+BvMOmiRRda1NdS+7KVZeR6HiABS2gbgPmaNkA9+FVSVhJa/ShKSwOeDZlQkM0CQei6COo1tTKHt57/kXqPSP9VYIlZknDdFYEwdpC9tJi+hN6Qn+Qk6IcBoL1PXVVNmfwRMxAJaHa0PVa1X/ivQjLqCCi5YKx4tziDbFXNNPVxJ8h14qoTP9WQa3Aq2zV3JQKUktEbjCA+ibotoP1QtzEpPHCd7TRwCMm3Awhcw+fRzQ04aXCasN0nqmk1zZ9Vx21jwUpg5mTBdAKn5ZEVCIPOUs7D4GRPcIIPATSxrIJh302FSiHAO+8RH5X3J/gYWCQzT76P6C5G65rkx/a2PXCPYqR92BeFXBmxM/OQzlMLuYFQJg5nkvGdiQDjASzDV0WfSPV+QU1bxZzWsBXxnNBAi7xnVDRnJwgUknMTW5VeFnEUqazU5+8njHlq2ArhCYrsn3c4rJtlWFLK95PkUlg2+NxqL3gJBS/8luzJeLzpztAIlXWi2LOXRwERedaDxauht9oGQUIM+jIeWUn55qw2SC/C24S9BSTjBAIQXHn9d/sgIXRQm/7IChxr2PnIXE0JjSfqg4a1UC8C5rfnARIWEJ0siUDEmOq0Ocvb+GzHknSUbUzg8sUkyVvDfpNbNQ2RygRJs/Of6iYJdNily8X1buNuDe7UAsBhXAGprC9xUVxCa7vIbepz9Qhq24NsIxXRBNM04wn/knPvma3zEG58JfdPbP0cuQLpEznGo3NqLRviB1/Booal1b/X1S17f/rzT/acaGYHqqI73YdZ7DBXl7t6FZ0d75VEAG2gwB6RN87lgV/1ghW4KuK7QpvDnB7A46Kj3CXSQrg14bY6Oc0LO15UsG5kYgBRLk3S5Xqw1by4Pcv2uQhpglc6Vs7FmDlb1JmcN7eQ== rsa-key-20200720

 

Selected the private key in putty and worked flawless.

 

Put the private key here as well for you to test. No password.

test.ppk

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines