--- tags: Ubuntu, SSH --- # AutoSSH ## don't use a password Generate a passphraseless SSH key and push it to your VM. If you already have an SSH key, you can skip this step… Just hit Enter for the key and both passphrases: ``` $ ssh-keygen -t rsa -b 2048 Generating public/private rsa key pair. Enter file in which to save the key (/home/username/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/username/.ssh/id_rsa. Your public key has been saved in /home/username/.ssh/id_rsa.pub. ``` ## Copy your keys to the target server: ``` scp ~/.ssh/id_rsa.pub ItDev_Billy@192.168.1.110:/home/ItDev_Billy ``` ## Add public key to autorized_keys ``` cat id_rsa.pub >> ~/.ssh/authorized_keys .ssh/authorized_keys to make sure we haven’t added extra keys that you weren’t expecting. ``` ## Finally check logging in… ``` $ ssh id@server ```