Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Need to set up SSH key login

Posted on 2015-01-08
Medium Priority
Last Modified: 2015-01-11
A new client wants us to send them data using SFTP. They have asked for our public key.  We are not currently using SSH key authentication anywhere.  How can I set this up?  The data will be sent from a specific server only, and we currently send data to other clients using login\password authentication.
Question by:billherde
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 12

Accepted Solution

Tej Pratap Shukla ~Dexter earned 668 total points
ID: 40539678
Hi Billherde,

While searching on google I just found a link on that there is an information about how to setup SSH keys:

Link: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

If you still need any help, let me know.

LVL 33

Assisted Solution

by:Dave Howe
Dave Howe earned 1332 total points
ID: 40539801
what software will you be using to send the data?

Usually, when using SSH with key auth rather than password, you generate a keypair locally (I strongly advise "puttygen" from here, use no less than a 2048 bit key), send them the public key (cut and paste from the box labelled "Public key for pasting" into a text file, and attach that to the email. some email clients reformat body text) then save the private key in a suitable form.

many clients can use the putty standard file format directly - filezilla, for example - but you would need to specify the sending app before I could advise further.

Author Comment

ID: 40540552
Thank you for your replies.
The sending app is a home-built application built on .net architecture. We have built in the hooks to send password authentication, and not being a programmer, I do not know what would have to change in that.
I also found the links to set this up using putygen.  Please confirm this would need to be done from the server that will be making the connection. (fortunately only one)  
Another caveat in this is that sometime in the next year we expect we may be sending data from this server for two company names, at the same recipient server.  We would be able to keep the data seperate using login names for authentication, but if the only authentication is a key, I need to confirm if there would be issues using multiple keys on the same server. (I would think not, but as I said, this is new ground for me.)
Cyber Threats to Small Businesses (Part 1)

This past May, Webroot surveyed more than 600 IT decision-makers at medium-sized companies to see how these small businesses perceived new threats facing their organizations.  Read what Webroot CISO, Gary Hayslip, has to say about the survey in part 1 of this 2-part blog series.

LVL 33

Assisted Solution

by:Dave Howe
Dave Howe earned 1332 total points
ID: 40540675
OK, I see the issue.
you are using password auth in ssh. depending on the dotnet library you are using for ssh, you will want to supply the key in place of the password; for instance, in sharpssh you would use the addIdentity method to load the key,....

puttygen will give you two things - a public key (send to the server's owner) and the private key (you keep this, and supply it to the library to authenticate to the server with)

Author Comment

ID: 40542207
Let me give that t shot.  will get back to you.  Thanks.

Author Comment

ID: 40543115
Using puttygen I created a keypair and set up a user on the ftp server with key authorization.  I am using Ceberus FTP as the FTP host. This part I am pretty sure is done correctly as I have another client that connects with a public key and it is working.

I have been trying to use filezilla to test and educate myself on how it works.  I am unable to get it connected. The server is responding with "2015/01/11 07:02:29       [1068]       Disconnect reason: No supported authentication methods available"

I have tried loading the private key in pagent, I have tried adding it to the SFTP setting in filezilla.  The SSH connection type is selected, and I have tried every option for logon type.  I also found a reference to the puttygen string getting formatted when saving, and have made the public key file again by copy/paste out of the puttygen window.  Also noted that the client supplied pub files do not have the "begin ..." text at the start of the public key and tried a version that more closely resembled public keys that work.

Any ideas what I should be doing to get these keys to work?

reference links
LVL 33

Expert Comment

by:Dave Howe
ID: 40543389
pagant should work - I use that method myself; also, if you don't have a password set on the putty private key, you can add it directly into the filezilla setup (Connection -> SFTP and "add keyfile" - needless to say, this doesn't work if there is a password set on the keyfile.)

Public keys for openssh use (the most common) do not begin with "begin..." - those are for commercial ssh - if you need those, then you should use the menu option "save public key" in puttygen - otherwise, the text box in puttygen labelled "public key..." and containing text beginning "ssh-rsa" or "ssh-dsa" is the openssh key, and should be cut and pasted from that box to send to the server's owner.

in filezilla, you should select the protoocol sftp and logon type normal, leaving the password field blank. The fact you are getting the "no supported auth" error should indicate that you got this correct, although the refusal to honour the pagant is puzzling, and it is more likely that the error is at the remote (server) side.

Author Closing Comment

ID: 40543751
The final issue was the simple stuff.  I had typo'd the username on the filezilla site setup.  Must have looked at it 50 times before I saw the missing letter.

Thanks for all the help.  Puttygen was easy to use to create the keys.  Filezilla and Pagent work well enough to get the job done.  I like it best with the apps installed so the .ppk files associate with Pagent.  That saves some clicks and complexity for the users.  Filezilla running from a shared location on the terminal server will keep me from having to set up for multiple usrs, but I have not tested if it will cause an issue with more than one user hitting it at a time.  Users will not be an issue once the parser takes over the job.

So now I have another tool on the bat belt.

Thanks again.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When the confidentiality and security of your data is a must, trust the highly encrypted cloud fax portfolio used by 12 million businesses worldwide, including nearly half of the Fortune 500.
Ransomware is a growing menace to anyone using a computer or mobile device. Here are answers to some common questions about this vicious new form of malware.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question