View Full Version : SecureCRT SSH2 to FreeBSD OpenSSH
Africa
08-22-2005, 02:45 AM
Please, can you give me step-by-step instructions how I can connect to my FreeBSD machine with OpenSSH running, using Public Key authentication? I can connect with password auth but not with Public key.
bocks
08-22-2005, 04:54 PM
Hello Africa,Please, can you give me step-by-step instructions how I can connect to my FreeBSD machine with OpenSSH running, using Public Key authentication? I can connect with password auth but not with Public key.The first step is to get your public key onto the server. The easiest way to do this would be to upload the identity.pub file using an sftp tab or by X or Zmodem and then running the dos2unix command on the file to convert it from a Windws text file to a Unix text file.
In order to use your public key you must transfer the .pub file created by the Key Generation wizard to the ~/.ssh directory on the SSH2 The second version of the SSH protocol which provides a way to encrypt network traffic between a client and a server, with a slightly different set of security features than the SSH1 protocol provides. server A computer program that provides services to other computer programs (called clients). Often the computer on which a server program runs is also called a server. The term host is often used as a synonym for server.. It is recommended that you follow the procedure below for using copy and paste to create a copy of the Identity.pub file in the ~/.ssh directory on the remote machine. If you decide instead to transfer the Identity.pub file to the ~/.ssh directory using an FTP client A computer or application that uses services provided by a server., be sure to transfer the file in ASCII mode. Also be sure to complete step 4d below.
To use copy and paste to configure the SSH2 server to recognize your Identity.pub file:
Connect to the remote server using SSH2 and password authentication.
On the local machine, use Notepad.exe to open the Identity.pub file that was created with the Key Generation wizard.
With the Identity.pub file opened in the Notepad application, open the Edit menu and choose Select All. Once everything is selected, open the Edit menu again and select Copy.
On the remote machine, complete the following steps:
% cat > ~/.ssh/identity.pub/ Click on the SecureCRT paste button to paste the contents of the Clipboard (which should now contain the contents of your Identity.pub file).
Issue a CTRL+D to close the Identity.pub file. Convert the key to one that OpenSSH will recognize using the following command:
For OpenSSH 2.5 and earlier, use:% ssh-keygen -X -f ~/.ssh/identity.pub >> ~/.ssh/authorized_keys2
For OpenSSH 2.9 and later, use:% ssh-keygen -i -f ~/.ssh/identity.pub >> ~/.ssh/authorized_keys2
Ensure that you are the only user with permissions to write to the Identity.pub file.
Note: As of version 3.0, OpenSSH has made some file name changes. The following files:
/etc/ssh_known_hosts2
~/.ssh/known_hosts2
~/.ssh/authorized_keys2are now obsolete. You now should use, respectively:
/etc/ssh_known_hosts
~/.ssh/known_hosts
~/.ssh/authorized_keysFor backward compatibility ~/.ssh/authorized_keys2 will still be used for authentication and host keys are still read from the known_hosts2. However, those deprecated files are considered "read only". Future releases are likely not to read these files.
Please let me know if this is information helps or if you have any questions about the process.
Thanks,
-bocks
Africa
08-23-2005, 05:59 AM
Thats great!
Thanks a lot!
vBulletin v3.5.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.