Here, you could press ENTER to create a key with no passphrase, though in this example, we use a passphrase of ssh-keygenĮnter file in which to save the key (/home/steve/.ssh/id_rsa): press ENTERĮnter passphrase (empty for no passphrase): sshkey-passphraseĮnter same passphrase again: sshkey-passphrase You can give it a different prefix if you like, when it prompts you below. I cannot think of a situation in which I would create a key without a passphrase if there is no passphrase, then as soon as somebody gets that file, they can impersonate you.īy default, it will create the Private key in $HOME/.ssh/id_rsa and the Public key in $HOME/.ssh/id_rsa.pub. This means that even if someone gets hold of your private key file (such as, a system where somebody else has root access, or if you need to be certain that the key won't be usable by anybody else if they get hold of it at some time in the future), it won't do them any good, because they will need the passphrase to unlock the key itself. You may optionally add a passphrase to the key. The ssh-keygen command does this for you. If you don't already have a id_rsa and id_rsa.pub in your $HOME/.ssh/ directory, then you will need to create them. It also configures all of the file permissions correctly, because SSH is (rightly) very picky about who can access your SSH configuration. The ssh-copy-id command copies your Public Key to a remote machine. Handy ssh command of the day: ssh-copy-id. 8th October 2016 Copying SSH ~/.ssh/id_rsa between machines
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |