I KNOW how to setup a new ssh key pair with github.
If someone gave me a private key and told me to connect to a server via ssh on a mac, how do I set this up?
NOTE: I can't change the server settings.
|
I KNOW how to setup a new ssh key pair with github. If someone gave me a private key and told me to connect to a server via ssh on a mac, how do I set this up? NOTE: I can't change the server settings. |
|||
|
|
|
I assume the standard OpenSSH is available on your Mac; if you're using a pretty GUI program, then this might not work. I also assume you've been given an OpenSSH-standard key. (The commercial ssh.com keys might be formatted differently; at least they were a decade ago, when I last used a provider that still used the commercial SSH.) Perhaps you already have a private key; check If you don't already have a private key, take a look at the first line of the file. It'll look something like this:
If it says If the
The I don't know the easiest way to store the file. If you have a standalone file (email attachment, web site download, etc.), you can simply move the file into place:
The If you've got the file copy-and-pasted into an email text or web page text, you'll need to use a text editor of some sort to save the file, via copy-and-paste of the text itself. (Don't use Word. BBEdit or TextMate or .. whatever Apple calls their plain text editor .. would work.) Now test it:
e.g.:
If you need to give a username too:
The important piece is the for key -- if it just asks for a password, it is probably a password for the remote endpoint, and that won't work. If it asks for the passphrase for the key, then you're running. If you already have a private key you wish to keep using, store the file into something else; e.g.
Here, I've assumed the hostname is The And the final note: most |
|||||||||||
|
|
I found your question while looking for a way to manage Amazon EC2 keys. Like you, I already had a key for github. What I did was duplicate the existing
And then replace the contents of this new file ( Then I added an entry to ~/.ssh/config (replace
This allowed me to For a one-time connection, you can skip the ~/.ssh/config file and simply run
|
||||
|
|