LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help with SSHD (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-sshd-4175531608/)

mr_m_cox 01-20-2015 06:43 AM

Need help with SSHD
 
I have been asked to setup an SFTP which uses RSA public key authentication.

AS it was already in use I have opted to use CygWin and I can get it to work with passwords fine.

we are going to be hosting the SFTP server with users from the clients office connecting to it. The client has sent me their public key.

Having done LOts of reading and even more attempting to configure the server I just cant get it to work. Most of thetime I get..
ebug1: Host '127.0.0.1' is known and matches the ECDSA host key.
debug1: Found key in /home/ColoniAdmin/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ColoniAdmin/.ssh/id_rsa
debug1: Trying private key: /home/ColoniAdmin/.ssh/id_dsa
debug1: Trying private key: /home/ColoniAdmin/.ssh/id_ecdsa
debug1: Trying private key: /home/ColoniAdmin/.ssh/id_ed25519
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).

I have once managed to get it to the point of asking for a passphrase for the private key but I don't have a private key (that I know of) just the public key the client sent us. and I certainly don't want to have to use passphrases

Their public key is in the authorized_key file on our server within the .ssh folder of their home folder. I have amended paswd and sshd_config to set home location and to allow RSA authentication.

All and any advice is super welcome, I have been doing this for 2 weeks now and i just wont work.

HELP HELP HELP!!!!!! ;-)
Thanks

business_kid 01-20-2015 11:46 AM

You need to read up on RSA encryption. Useful search terms are Rivest, Shamir, Aldman (=RSA)

They have done correctly in giving you their public key. I don't see you mention your private key at all and it is essential that you generate one. Have you a public key? Have they got it? I hope you have a utility for generating a keys.

The beauty of this is that you use your private key (Meeting certain specs) and their public key, and they use their private and your public key (Have you got one of those?) and things can be understood. It's based on stuff like Euler's Totient, the sort of stuff you read about and know less than when you began :-/.

chrism01 01-21-2015 03:32 AM

Try this http://www.thegeekstuff.com/2008/11/...n-ssh-copy-id/

Basically, you generate a key pair; keep the private on the client and add the public to the server.

descendant_command 01-21-2015 05:31 AM

You can't test their connection without their private key.
To test the method, generate your own keypair and add your pubkey to the relevant auth_keys file on the server.


All times are GMT -5. The time now is 03:32 PM.