Jan 30, 2017 How To Create SSH Key on mac - Duration: 8:00. PeopleCanCode 10,780 views. Is there putty on mac? How to connect ssh on mac? - Duration: 1:18. Rookie Developer 50,263 views. Dec 14, 2017 - PuTTYgen is a robust SSH key pair generation tool that comes via. In the putty connection configuration screen, expand Connection -> SSH.
Table of Contents. Install PuTTY Go to (you can find this page by ) & download the EXE installer under A Windows installer for everything except PuTTYtel. Double-click on the EXE & install it. Generate the SSH key You’re going to generate SSH keys that work on Windows & UNIX (Linux & Mac OS X). If you’re using Windows only, you certainly don’t need to generate the UNIX keys. But who knows—one day you might get a real operating system (that’s the UNIX bias in me speaking out), & it would be nice to have your SSH keys for UNIX already made.
You’re going to need to store the keys somewhere. I would not recommend using the PuTTY folder in Program Files, as you will forget about it & fail to back it up. Instead, create a folder called SSH Keys (in Documents, for instance) on your hard drive & use that.
Or you can use Dropbox or even Microsoft SkyDrive. Just make sure you keep those keys safe & backed up! Create Windows SSH keys Go to Start PuTTY PuTTYgen. The PuTTY Key Generator opens. Leave the defaults alone & press Generate.
Move your mouse rapidly over the blank area of the window to create random date it can use to create the key. Press Save Public Key. When asked where you want to save the file, navigate to the SSH Keys folder you created earlier. For File Name, just enter public. Press Save Private Key.
When asked “Are you sure you want to save this key without a passphrase to protect it?”, press Yes. When asked where you want to save the file, navigate to the SSH Keys folder you created earlier. For File Name, just enter private. You have now created the SSH keys that will work on Windows with PuTTY.
Create UNIX SSH keys Select Conversions Export OpenSSH Key. When asked “Are you sure you want to save this key without a passphrase to protect it?”, press Yes. When asked where you want to save the file, navigate to the SSH Keys folder you created earlier. For File Name, enter idrsa. Make sure that Windows or your text editor didn’t add an extension onto the end.
To save the public key, select the text in the box under “Public key for pasting into OpenSSH authorizedkeys file” & copy it. It should look something like this: ssh-rsa AAAAB3NzaC1yc2EAATUDNWEIOKZAixw8LANsVbPCnE7OT4OFwC37AQr7kjP6gOoONc/duxnP0iPf+jZM7vRS/vTkq8kUnDoTvHRxI6slCj8HWWu+Z+jSukggf48DpZ+Ty9Wn7wceDhdYcrWT1UAoPKBwQit/h3vPx777hsaTKCYsjkpeCozPgf6JitABCDEFGekNU= rsa-key-20630316 Paste it into a text editor like or (NOT Notepad or Word!) & save.
When asked where you want to save the file, navigate to the SSH Keys folder you created earlier. For File Name, enter idrsa.pub. Look in the SSH Keys folder to make sure that Windows or your text editor didn’t add another extension onto the end, like.txt or.htm or something like that. Configure PuTTY Open PuTTY. Select the Session category.
For Host Name, enter foobar.com (or whatever your SSH server’s host name is). Select the Data category. For Auto-Login Username, enter admin (or whatever SSH username you’re using). Select the Connection category SSH Auth. For Private Key For Authentication, choose private.ppk.
Go back to the Session category. For Saved Sessions, enter FooBar (or whatever descriptive text you’d like) & press Save. Log in with PuTTY Open PuTTY.
Select the Session category (it’s the default). Select the FooBar saved session, press Load, & then press Open. The very first time you connect to your SSH server, you will see a PuTTY Security Alert that says “The server’s host key is not cached ”.
Press Yes & you’ll never see that again. You should now be logged into your SSH server. Start issuing commands. Because a decent, free SSH client on Windows is like.
In the UNIX world, there are a plethora of great, free SSH clients (we call them terminals, he said snarkily), but when it comes to Windows, you have a bunch of and PuTTY (if you loathe PuTTY—& believe me, I understand— has some good options). And no, is overkill. Why no passphrase? Well, convenience, really. In, I explained it this way: Some of you are wondering about the security of this trick. No passwords? Freely exchanging keys?
It’s true, but think about it for a moment. True, if someone gets on pound, he can now connect to eliot without a password. But that simply means that you need to practice good security on pound. If pound is compromised, you have enormous problems whether or not the attacker realizes that he can also get to eliot. On top of that, you shoot passwords around the Internet all the time. If an attacker acquires your password, he can do major damage as well.
Isn’t your private key as important as a password? And aren’t you going to back it up and safeguard it? When you think about it in those terms, exchanging keys via ssh is at least as secure as passwords, and in most ways much more secure. That said, if you’d rather use passwords, then you’ll probably want to use so you’re not constantly forced to keep entering your password when you use your SSH keys. Of course, you need to be able to see the extensions on your files in the first place, something that Windows hides by default (Mac OS X does too, & it’s just as stupid for Apple as it is for Microsoft). I’ve written instructions detailing that have proven quite popular over the years.
This is one poorly-designed GUI. Really, I have to jump around three different screens to enter info that should be on one?
I have been using Putty on Windows XP and used the.ppk file to connect to my Linux servers (several servers). On the servers I have the following folder and file /.ssh/authorizedkeys I now want to use a Mac to connect via the terminal. I have set up the remote connections to the servers manually and want to know how I can setup using the ppk file or the private/public key within it.
Please note: I already am using private/public key login from Windows so I do not need to create a new key using keygen, I just want to know how to set up now that I have the keys already. (In other words, I already have the authorized key lists on the server, and the public and private key). You can ssh directly from the Terminal on Mac, but you need to use a.PEM key rather than the putty.PPK key. You can use PuttyGen on Windows to convert from.PEM to.PPK, I'm not sure about the other way around though. You can also convert the key using putty for Mac via port or brew: sudo port install putty or brew install putty This will also install puttygen. To get puttygen to output a.PEM file: puttygen privatekey.ppk -O private-openssh -o privatekey.pem Once you have the key, open a terminal window and: ssh -i privatekey.pem [email protected] The private key must have tight security settings otherwise SSH complains.
Make sure only the user can read the key. Chmod go-rw privatekey.pem.
Convert PPK to OpenSSh OS X: Install Homebrew, then run brew install putty Place your keys in some directory, e.g. Your home folder. Now convert the PPK keys to SSH keypairs:cache search To generate the private key: cd puttygen iddsa.ppk -O private-openssh -o iddsa and to generate the public key: puttygen iddsa.ppk -O public-openssh -o iddsa.pub Move these keys to /.ssh and make sure the permissions are set to private for your private key: mkdir -p /.ssh mv -i /iddsa. /.ssh chmod 600 /.ssh/iddsa chmod 666 /.ssh/iddsa.pub connect with ssh server ssh -i /.ssh/iddsa username@servername Port Forwarding to connect mysql remote server ssh -i /.ssh/iddsa -L 9001:127.0.0.1:3306 username@serverName. There is a way to do this without installing putty on your Mac.
You can easily convert your existing PPK file to a PEM file using PuTTYgen on Windows. Launch PuTTYgen and then load the existing private key file using the Load button.
From the 'Conversions' menu select 'Export OpenSSH key' and save the private key file with the.pem file extension. Copy the PEM file to your Mac and set it to be read-only by your user: chmod 400.pem Then you should be able to use ssh to connect to your remote server ssh -i.pem username@hostname. Actually @sigi my answer was genuinely intended to be helpful. The primary goal of the question as I understand it is to connect from a Mac to a Linux server using an existing.ppk file from a Windows machine.
Given the question asker has access to a Windows machine then converting the.ppk file to a.pem file prior to copying it to the Mac is just as valid a solution as first copying it to the Mac and converting it there. I suggested this approach because some people may prefer not to install additional software on their Mac that they don't otherwise need. – Sep 8 '17 at 5:05.