Generating a private key using Putty

In trying to create a private key using Putty and then trying to import it using IPswitch. I was given the public key from the  vendor
Aron SchiffenbauerSenior System AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Putty is an ssh client.

Putty doesn't generate keypairs, Putty uses keypairs.

To generate a keypair, you'll do something like this...

ssh-keygen -q -N 'unique-long-passphrase' -b 2048 -t rsa -f ~/.ssh/keyfile.rsa -C 'Use for keyfile'

Open in new window


This will produce a keyfile.rsa (private key) + keyfile.rsa.pub (public file) you can use anywhere a keypair is used.
Dr. KlahnPrincipal Software EngineerCommented:
It is not normally necessary to generate keys for PuTTY, as a server's public key is normally part of the initial interchange.  However, for some specific cases it is required.

https://www.ssh.com/ssh/putty/windows/puttygen

https://www.ssh.com/ssh/putty/linux/puttygen
serialbandCommented:
Your question is not completely clear.

It's not possible to generate a private key from a given public key.  Otherwise, you'd be able to decrypt everyone's keys and eavesdrop on them or take over their sessions.

You probably got a server's public key to verify the identity.  Normally, on linux/unix, you put that server public key in your ~/.ssh/known_hosts file so that you can bypass the initial server fingerprint prompt.  With putty, it's a little trickier, and it's easier to have them give you the server fingeprint so that you can compare it during your first connection.  You'll need to open and convert the key to a REG_SZ value to enter into the registry with the following name format encryption_type@IP_or_Hostname to place into the registry hive at HKCU\Software\SimonTatham\Putty\SshHostKeys\

If you need to generate a private/public key pair to use for ssh keys to a server, then you use puttygen as Dr Klahn linked.  This creates a personal putty private key (ppk) and a public key that you would place on the server.  You then use pagent.exe to load the ppk and connect to the server without having to use your password all the time.
5 Ways Acronis Skyrockets Your Data Protection

Risks to data security are risks to business continuity. Businesses need to know what these risks look like – and where they can turn for help.
Check our newest E-Book and learn how you can differentiate your data protection business with advanced cloud solutions Acronis delivers

Aron SchiffenbauerSenior System AnalystAuthor Commented:
Im using a application called IPswitch  to SFTP,I have the public key but to create a connection its asking me for a private key. Can someone please assist me with this?
Thanks
serialbandCommented:
I'm not familiar with paid SSH/SFTP programs such as IPswitch, since ssh tools are available for free or built in to the OS..  Please upload a screen capture to show the window you're referring to.  It's not quite making sense why it would ask for a private key, unless the server may be set to force Public Key Authentication and you have to create a key pair.
Aron SchiffenbauerSenior System AnalystAuthor Commented:
the vendor sent me their public keys. When trying to import them into IPSwitch, its asking me for a private key which I created in GenPutty. The error message is unsupported format.
KeyA.png
keyB.png
keyC.png
serialbandCommented:
You're generally not supposed to send a private key to someone else.  The public key isn't one you're supposed to load that way.  It's one you're supposed to use to compare and verify the server identification.  Normally, you'd just send the fingerprint.  Have you tried connecting to the server using a username and password scheme.

You won't be able to load a public key as a private key.  They're stored in different text formats for a reason.  What instructions did your vendor give you when they sent the key?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aron SchiffenbauerSenior System AnalystAuthor Commented:
this is what they said For SSH key pair authentication, attached is our SSH key for Test and production.
they gave me the host server, name and two public keys

This is a quote from them

"For SSH key pair authentication, attached is our SSH keys for Test and production.  We preferred authentication method. the vendor requires Partner's SSH public key when they return this form".
serialbandCommented:
If that is the exact text they sent you, then English may not be their first language.

I think they sent you the public keys for you to put in the ~/.ssh/authorized_keys file on your server for them to connect without a password.  It's difficult to exactly decipher what they mean with those sentences.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Security

From novice to tech pro — start learning today.