VanDyke Software Forums

Go Back   VanDyke Software Forums > Secure Shell
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-22-2005, 02:45 AM
Africa Africa is offline
Registered User
 
Join Date: Aug 2005
Posts: 2
SecureCRT SSH2 to FreeBSD OpenSSH

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.
Reply With Quote
  #2  
Old 08-22-2005, 04:54 PM
bocks's Avatar
bocks bocks is offline
VanDyke Customer Support
 
Join Date: Jan 2004
Location: Albuquerque, NM
Posts: 184
Hello Africa,
Quote:
Originally Posted by 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:
  1. Connect to the remote server using SSH2 and password authentication.
  2. On the local machine, use Notepad.exe to open the Identity.pub file that was created with the Key Generation wizard.
  3. 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.
  4. On the remote machine, complete the following steps:
    1. Code:
      % cat > ~/.ssh/identity.pub/
    2. Click on the SecureCRT paste button to paste the contents of the Clipboard (which should now contain the contents of your Identity.pub file).
    3. Issue a CTRL+D to close the Identity.pub file.
    4. Convert the key to one that OpenSSH will recognize using the following command:

      For OpenSSH 2.5 and earlier, use:
      Code:
      % ssh-keygen -X -f ~/.ssh/identity.pub >> ~/.ssh/authorized_keys2
      For OpenSSH 2.9 and later, use:
      Code:
      % ssh-keygen -i -f ~/.ssh/identity.pub >> ~/.ssh/authorized_keys2
    5. 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:
Code:
/etc/ssh_known_hosts2 ~/.ssh/known_hosts2 ~/.ssh/authorized_keys2
are now obsolete. You now should use, respectively:
Code:
/etc/ssh_known_hosts ~/.ssh/known_hosts ~/.ssh/authorized_keys
For 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
Reply With Quote
  #3  
Old 08-23-2005, 05:59 AM
Africa Africa is offline
Registered User
 
Join Date: Aug 2005
Posts: 2
Thats great!

Thanks a lot!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 10:07 PM.


© copyright 1995-2010 VanDyke Software, Inc.