LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Three SSH questions (https://www.linuxquestions.org/questions/linux-networking-3/three-ssh-questions-715003/)

bollweevil 03-27-2009 10:34 PM

Three SSH questions
 
1. Which computer can I generate the public-private key pair on, the server, the client, or either one?

2. What is the most kosher way to write the sshd_config file so that the SSH server will accept ANY connection with a valid username and password, without checking for installed public-private keys and whatnot?

3. If I generate the key pair on the server, how am I supposed to get id_dsa.pub (or id_rsa.pub) off of the server and onto the client/remote computer? The server is completely headless, no GUI, no CD burner, no USB ports, no email yet, no website served up yet, just a fixed IP address. I eventually overcame this problem because a friend had a server that I was able to SCP the id_dsa.pub file onto, but what if I didn't have access to a server already? Are there free servers for this out there? Is there a really easy way of emailing a file from the command line? I almost used imaplib in Python to place it on my IMAP server. I could have used Telnet to send the email manually, but I don't know how to do an attachment.

Thanks.

anomie 03-27-2009 11:15 PM

Quote:

Originally Posted by bollweevil
1. Which computer can I generate the public-private key pair on, the server, the client, or either one?

Assuming both the server and client have ssh-keygen installed, you can use either. When it's all said and done, you will want the public and private keys on the client, and only the public key on the server.

Quote:

Originally Posted by bollweevil
2. What is the most kosher way to write the sshd_config file so that the SSH server will accept ANY connection with a valid username and password, without checking for installed public-private keys and whatnot?

To enable both password and pubkey authentication, specify:
Code:

PubkeyAuthentication yes
ChallengeResponseAuthentication yes
UsePAM yes

You can (and probably should) disable all other authentication forms.

Quote:

Originally Posted by bollweevil
3. If I generate the key pair on the server, how am I supposed to get id_dsa.pub (or id_rsa.pub) off of the server and onto the client/remote computer? The server is completely headless, no GUI, no CD burner, no USB ports, no email yet, no website served up yet, just a fixed IP address.

I don't follow. You are generating a key pair on a box (which will act as the client), and you need to get the public key to the remote computer (which will act as the server)?


All times are GMT -5. The time now is 10:22 AM.