Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

Need to set up SSH key login

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.
0
Bill Herde
Asked:
Bill Herde
  • 4
  • 3
3 Solutions
 
Tej Pratap Shukla ~DexterServer AdministratorCommented:
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.

Thanks
Dexter
0
 
Dave HoweSoftware and Hardware EngineerCommented:
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.
0
 
Bill HerdeOwnerAuthor Commented:
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.)
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Dave HoweSoftware and Hardware EngineerCommented:
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)
0
 
Bill HerdeOwnerAuthor Commented:
Let me give that t shot.  will get back to you.  Thanks.
0
 
Bill HerdeOwnerAuthor Commented:
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
http://askubuntu.com/questions/204400/ssh-public-key-no-supported-authentication-methods-available-server-sent-publ
https://www.digitalocean.com/community/tutorials/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps
https://wiki.filezilla-project.org/Howto
http://superuser.com/questions/180221/connect-to-server-using-sftp-and-public-ssh-key-using-filezilla-on-windows
0
 
Dave HoweSoftware and Hardware EngineerCommented:
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.
0
 
Bill HerdeOwnerAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now