Using OpenSSH from Windows Powershell with ORION virtual machines

How to use OpenSSH keys for authentication/login to ORION virtual machines using Windows 10 Powershell

ORION Virtual Machines are configured by default to utilize OpenSSH key exchanges for authentication, rather than passwords.  In the past, Windows systems required third party software to handle SSH keys, however, Windows 10 now has built-in OpenSSH support in the powershell. 

  • To get started, run powershell as admin and type the following; this will allow you to manually start ssh-agent from user space:
    • Windows PowerShell
      Copyright (C) Microsoft Corporation. All rights reserved.

      Try the new cross-platform PowerShell

      PS C:\Windows\system32> Get-Service -Name ssh-agent | Set-Service -StartupType Manual
      PS C:\Windows\system32>
  • In a separate powershell window, generate your ssh key & provide a passphrase. Your private and public keys will be stored in the .ssh directory by default. You can use the command ‘cat’ to show the contents of the key files.
    • PS C:\Users\netID.ADRICE> ssh-keygen.exe
      Generating public/private rsa key pair.
      Enter file in which to save the key (C:\Users\netID.ADRICE/.ssh/id_rsa):
      Created directory 'C:\Users\netID.ADRICE/.ssh'.
      Enter passphrase (empty for no passphrase):
      Enter same passphrase again:
      Your identification has been saved in C:\Users\netID.ADRICE/.ssh/id_rsa.
      Your public key has been saved in C:\Users\netID.ADRICE/.ssh/
      The key fingerprint is:
      SHA256:CsiswhDb10IjhCMy7JMZHUNZvW8K/LceEHZrPfchDBs adrice\netID@DESKTOP-OU6HJ3D
      The key's randomart image is:
      +---[RSA 2048]----+
      |..+++.. |
      |*+ o. . |
      |=o= o o.. E |
      | @ + o..o o = |
      |o * = ..So + + . |
      |o. . = .oo o o .|
      |o. + o. . |
      |. o .. |
      | oo. |
      PS C:\Users\netID.ADRICE> cd .ssh
      PS C:\Users\netID.ADRICE\.ssh> dir

      Directory: C:\Users\netID.ADRICE\.ssh

      Mode LastWriteTime Length Name
      ---- ------------- ------ ----
      -a---- 9/29/2020 1:37 PM 1766 id_rsa
      -a---- 9/29/2020 1:37 PM 412

      PS C:\Users\netID.ADRICE\.ssh> cat .\
  • In the ORION web console, go to the drop down for your user profile in the upper right hand corner, and select Settings:Update SSH Key.
  • Copy the contents of, as seen above, into the text box and click the “Update SSH Key” button.  Any VM that you create in ORION will automatically have this public key added to your account’s authorized_keys file when it is instantiated. 
  • Note that you MUSTdo this step prior to creating any ORION VMs, otherwise they will not get your ssh key installed and you won’t be able to login to them remotely.
    • Orion SSH Key Dialog
  • On your Windows system, start the local ssh-agent which will store your session keys:
    • PS C:\Users\netID.ADRICE\.ssh> ssh-agent

      Add the key to your agent keychain, providing the key password:

      PS C:\Users\netID.ADRICE\.ssh> ssh-add id_rsa
      Enter passphrase for id_rsa:
      Identity added: id_rsa (id_rsa)
  • Now, you should be able to ssh to the ORION virtual machine’s IP address, which can be found on the ORION dashboard for each VM:

    ORION Virtual Machine IP Address
  • Note that you will need to use your NetID when sshing in, since the account created on the new VM matches your NetID.
    • PS C:\Users\netID.ADRICE\.ssh> ssh netID@
      Warning: Permanently added '' (ECDSA) to the list of known hosts.
      Last login: Fri Jul 30 13:17:10 2021 from
      [netID@orion-196-60 ~]$

Keywords:ssh powershell windows keys orion openssh   Doc ID:114190
Owner:Clinton H.Group:Rice University
Created:2021-10-08 09:45 CDTUpdated:2021-10-19 10:02 CDT
Sites:Rice University
Feedback:  4   4