Using SSH in NetBoot image

1 users found this article helpful

Information

It is possible to make SSH available in NetBoot image. The following argument (hidden) must be used when NetBoot image creation:

--ssh-authkeys <authorized-keys-file>

where <authorized-keys-file> - is a location of a file with SSH2 public key in authorized_keys format.

To get the SSH public key on Mac:

  1. Execute the following command in Terminal

    ssh-keygen -t rsa
    
  2. Specify file name to save key when you asked:

    Enter file in which to save the key (/Users/user/.ssh/id_rsa):
    
  3. Specify passphrase and repeat it when asked:

    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again:
    
  4. Use created "*.pub" file when creating NetBoot image with SSH by executing the following command:

    sudo ./pmm_osd_image_builder netboot -n <path-to-output-folder> --ssh-authkeys <path-to-public-key>.pub
    

To convert pub key to PuTTY ppk:

  1. Copy files with private and public keys (*.pub) on machine from which you will use SSH to login on Mac.

  2. Install PuTTY.

  3. Use puttygen.exe (it's installed with PuTTY into C:\Program Files (x86)\PuTTY\ by default) to convert rsa key to PuTTY *.ppk key:

    3.1. Double click on puttygen.exe.

    3.2. Click Load button near Load an existing private key file in Actions pane.

    3.3. Choose All Files (.) in drop-down list in opened Load private key dialog.

    3.4. In files list choose file with private key (file name doesn't contain *.pub) and click Open button.

    3.5. Enter passphrase when asked and click OK button.

    3.6. Close the dialog by click OK button.

    3.7. Click Save private key button and save key somewhere (result is *.ppk file).

To login via SSH on Mac booted from NetBoot image with enabled SSH:

  1. Run putty.exe.

  2. In Category tree go to Connection -> SSH -> Auth.

  3. In Authentication parameters pane click Browse button for Private key file for authentication.

  4. Choose *.ppk file (converted from private key in steps above).

  5. In Category tree go to Session.

  6. Type Mac hostname or IP address and open session.

  7. When asked, enter root as user name and specify passphrase.

NOTE There is no need to download PuTTY on the server where Parallels Mac Management Console Extension is running as Parallels Mac Management Console Extension installer will place both putty.exe and puttygen.exe in its installation directory.

Was this article helpful?

Tell us how we can improve it.