Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Create a SSH key?

I'm asked to create a SSH key to access a server. My question is, is it just as easy as running the ssh-keygen and save the keys or should I do something special like specifing the user and the domain?
I mean should I create a key that is in this format: [email protected] or is [email protected] okay that's created when I just run the ssh-keygen?
Don't really know how these keys work I've searched a bit but I haven't found anything that's relevant too my situation.
I'm running Mac btw but that shouldn't matter.
Yes it is as simple as using ssh-keygen as the user that you want to authenticate remotely as, then copying the public key that gets created (for example for RSA it's id_rsa.pub) to ~/.ssh/authorized_keys on the client.

Then you can seamlessly authenticate to the server from the client using ssh, with the user that you created the key as.
(Jun 22, 2015 11:41 PM)Benign Wrote:  Yes it is as simple as using ssh-keygen as the user that you want to authenticate remotely as, then copying the public key that gets created (for example for RSA it's id_rsa.pub) to ~/.ssh/authorized_keys on the client.

Then you can seamlessly authenticate to the server from the client using ssh, with the user that you created the key as.

Yeah but I think I'll be authenticating as the root user, should I create a key that's like [email protected] or will the certificate that's created if I just run the ssh-keygen okay?
(Jun 23, 2015 12:22 AM)Lorenzon Wrote:  Yeah but I think I'll be authenticating as the root user, should I create a key that's like [email protected] or will the certificate that's created if I just run the ssh-keygen okay?
Don't do that. Don't authenticate as root even with keys.

If you insist on doing that. You just need to use ssh-keygen. Then use scp to copy it to the remote server. Then change ssh_config so it says
PHP Code

<?php 
PasswordAuthentication no 
There is already an entry for it. Just change yes to no.
XMPP: pm me
ssh-add /home/user/.ssh/id_dsa

ssh USER@HOST_NAME -p

And you're ready to go.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Ubuntu] by BαkerSep 11, 2017 11:05 AM 9 224 Sep 11, 2017 11:05 AM
Last Post: Charger
by BLOW.Aug 25, 2016 08:30 AM 9 325 Aug 25, 2016 08:30 AM
Last Post: BLOW.
by Null StateSep 9, 2014 04:22 PM 5 87 Sep 9, 2014 04:22 PM
Last Post: Null State