Knowledgebase
emscom > emscom Help Desk > Knowledgebase

Search help:


SSH create keys

Solution

SSH Public & Private key generation

RSA and DSA keys are deprecated and may not be supported on all Mac and Linux versions.

bbThe recommendation at time of writing is to use ecdsa 521[sic] for a balance between security and compatibility

#create public and private key pair

ssh-keygen -f key-filename -t ecdsa -b 521

#copy the public key to the $home/.ssh directory of the remote server

scp key-filename.pub host.contoso.com:~/.ssh/.

#The public key must be added to the ~/.ssh/authorized_keys file on the remote host

user@host.contoso.com$ ssh-copy-id -i key-filename.pub user@host.contoso.com

## As an alternative to ssh-copy-id the key can be appended to the authorized_keys file

cat key-filename.pub >> ~/.ssh/authorized_keys

 

Key File Permissions

700  drwx------ ~/.ssh : SSH-Folder

644  -rw-r----- ~/.ssh/key-filename.pub : public key

600 -rw------- ~/.ssh/key-filename : private key

755 drwxr-xr-x ~/ : home folder (at most)

 

 

 

 

 
Was this article helpful? yes / no
Related articles OSX SSH login
Windows 10 NET make connection private
L2TP NAT Port forwarding
Article details
Article ID: 233
Category: Linux
Date added: 10-06-2024 11:28:51
Views: 34
Rating (Votes): Article not rated yet (0)

 
« Go back

 
Powered by Help Desk Software HESK, in partnership with SysAid Technologies