SSH and SSH-Keygen
Jump to navigation
Jump to search
- It really is as simple as you remember it
- Type "ssh-keygen"
ssh-keygen -f name_of_key
- You can "ssh-keygen -p -f old_private_key_file" to change the passphrase
- scp ./ssh/id_rsa.pub username@hostname:~/.ssh/
- On the host, `cp ~/.ssh/id_rsa.pub authorized_keys`, or append id_rsa.pub to that file if it already exists.
- Making it so that you don't have to enter in your username every time
- Go to ~/.ssh/
- Edit the config file
- Transfer the id_rsa.pub file to the server ~/.ssh/ and rename it to "authorized_keys", or append the entry to the authorized_keys file that's already there.
- client-side file: ~/.ssh/config
- IMPORTANT: private keys cannot be group or world readable or the server will ignore them, AND YOU WILL BE LOCKED OUT OF SSH-ING IN!
Host lgchrm* User colettace Host the_name_i_like User ccoletta-x HostName server.url.whizbang.com IdentityFile /full/path/to/local_key Port 2222