ssh-keygen myhost:~ username$ ssh-keygen Generating public/private rsa key pair. Enter file inwhich to save the key (/Users/username/.ssh/id_rsa): Created directory '/Users/username/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/username/.ssh/id_rsa. Your public key has been saved in /Users/username/.ssh/id_rsa.pub. The key fingerprint is: 4c:80:61:2c:00:3f:9d:dc:08:41:2e:c0:cf:b9:17:69 username@myhost.local The key's randomart image is: +--[ RSA 2048]----+ |*o+ooo. | |.+.=o+ . | |. *.* o . | | . = E o | | o . S | | . . | | . | | | | | +-----------------+ cat ~/.ssh/id_rsa.pub
Now you just need to type this code into your version control.