amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
4.47k stars 291 forks source link

[feature request] add auth to server by public key as alternative to user/pass #8

Closed lgg closed 3 years ago

lgg commented 3 years ago

I want to use Amnezia on VPS with other hosted services and for security reasons i have enabled only pubkey auth on SSH. I wish Amnezia to have support for pubkey auth on SSH as alternative to Password auth.

pokamest commented 3 years ago

WIP, almost done Test build already here - https://github.com/amnezia-vpn/desktop-client/releases/download/1.5/AmneziaVPN_for_free_oracle.exe

pokamest commented 3 years ago

1.5.1 Released with ssh key auth support (Windows only) https://github.com/amnezia-vpn/desktop-client/releases/download/1.5/AmneziaVPN_1.5.1.exe

bessgeor commented 3 years ago

Just downloaded Amnezia VPN from the amnezia.org and tried to authenticate via key pair. As a result I'm getting the following error: image

I could authenticate using the same credentials by using WSL, the difference is that ssh command requests private key password and amnezia vpn does not.

Straven commented 3 years ago

Amnezia can't connect not with private key neither with public. But all ssh-clients and tool succesfully authenticated. Fix problem pls. Password auth is not good.

pokamest commented 3 years ago

Private keys encrypted with password is not supported. If you are experiencing problems with authentication via keys try to convert your keys into PEM format using ssh-keygen utility. ssh-keygen -p -P "" -N "" -m pem -f path_you_private_key Do backup of your private key or convert a copy - ssh-keygen will replace file.

Please provide more information about your private key - what is key format you using? I need to know just header of your key - like "-----BEGIN RSA PRIVATE KEY-----". Don't send whole key.

Straven commented 3 years ago

yeah. my mistake was i not add header to input field. with header all works fine

pokamest commented 3 years ago

Issue fixed since 1.5.3