I will show you how to enable Public Key Authentication in PowerShell Server v6 installed in Windows 2012 R2 Server Core
- Click on “Client Key Manager” in Bitvise SSH Client, and “Generate New” to create a new key wit PassPhase Entered.
- Click on the Profile that you created in step 1, and “Export” the Public Key to “OpenSSH Format” as PublicKey (File Name)
- Copy the exported Public Key File to C:\ssl\PublicKey in Windows 2012R2 PowerShell Server
- Checked “Enabled Public Key Authentication” and select “File Based Public Key Authentication”by entering C:\ssh\PublicKey
- Open Bitvise SSH Client, and change the Initial Method to “Public Key” or “Public Key + Password” by entering the username, PassPhase & Password
- Login to PowerShell Server via SSH successfully, but I noticed that even through I login using Domain Administrator Account
According to Online Help,
Enable Public Key authentication: If checked, clients will be able to authenticate using a public key instead of a username/password. When using Public Key Authentication, no impersonation of the logged on user will be done by the server, so all commands will run in the context of the user the server process is running under. Clients connecting to the server using any certificate found in the selected store will be granted access. Public Key Authentication can be configured to use either the Windows certificate store or a keys file on disk.
I will start to exploring more by login using Public Key and see will it affected my daily job. Will update again if found any issues.