[GH-ISSUE #845] Error 300: SshRequestDeniedError with correct credentials #222

Closed
opened 2026-10-13 20:15:45 +00:00 by bsakaguchi · 29 comments
Owner

Originally created by @OpFab123 on GitHub (Jun 9, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/845

Originally assigned to: @Mitternacht822 on GitHub.

Describe the bug
When i want to install amnezia on my server, the app gives me Error 300: SshRequestDeniedError. The wiki states the following:

Occurs when incorrect data is entered while adding a new server.
Solution: Check the accuracy of the entered data.

Problem is, the credentials are correct for sure. How do I know? Getting remote access to the server using plain ssh from the command line works just fine. In addition, the ssh log (journalctl -u ssh) reports a succesful login, when i click connect in the app, though the app reports Error 300.

To Reproduce
Steps to reproduce the behavior:

  1. open the app.
  2. enter enter the login data
  3. choose protocoll
  4. click install
  5. the error appears

Expected behavior
The installation process should finish as expected.

Log files
i dont think the ssh log is helpful, espacially as i would redact quite a lot of it.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):
tested with:

  • Samsung A33 with Android 14
  • Samsung A8 with Android 9

Amnezia App

  • Version 4.5.3.0
  • installed over playstore

Server (please complete the following information):
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

proposed solution
Fix what ever is wrong?
Alternativly, I understand why you have choosen to make the installation process as easy as possible for non tech people, but this creates problems in case of any failures, as you have nothing to check. For example, if there was an bash installation script, one could look into it, see at wich step the script stops working and start digging into it, possibly finding e.g. a workaround.

Originally created by @OpFab123 on GitHub (Jun 9, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/845 Originally assigned to: @Mitternacht822 on GitHub. **Describe the bug** When i want to install amnezia on my server, the app gives me ```Error 300: SshRequestDeniedError```. The wiki states the following: ``` Occurs when incorrect data is entered while adding a new server. Solution: Check the accuracy of the entered data. ``` Problem is, the credentials are correct for sure. How do I know? Getting remote access to the server using plain ssh from the command line works just fine. In addition, the ssh log (```journalctl -u ssh```) reports a succesful login, when i click connect in the app, though the app reports Error 300. **To Reproduce** Steps to reproduce the behavior: 1. open the app. 2. enter enter the login data 3. choose protocoll 4. click install 5. the error appears **Expected behavior** The installation process should finish as expected. **Log files** i dont think the ssh log is helpful, espacially as i would redact quite a lot of it. **Screenshots** If applicable, add screenshots to help explain your problem. **Smartphone (please complete the following information):** tested with: - Samsung A33 with Android 14 - Samsung A8 with Android 9 **Amnezia App** - Version 4.5.3.0 - installed over playstore **Server (please complete the following information):** Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy **proposed solution** Fix what ever is wrong? Alternativly, I understand why you have choosen to make the installation process as easy as possible for non tech people, but this creates problems in case of any failures, as you have nothing to check. For example, if there was an bash installation script, one could look into it, see at wich step the script stops working and start digging into it, possibly finding e.g. a workaround.
Author
Owner

@pokamest commented on GitHub (Jun 11, 2024):

Could you tell more details about your server?
What is provider? What is extra settings on your server? What is username, root or other?

<!-- gh-comment-id:2161772713 --> @pokamest commented on GitHub (Jun 11, 2024): Could you tell more details about your server? What is provider? What is extra settings on your server? What is username, root or other?
Author
Owner

@glolsh commented on GitHub (Jun 12, 2024):

Second to this. I have clean Hetzner cloud server with key-only ssh auth. Getting error too.
I have these enabled ssh settings (/etc/ssh/sshd_config):

Include /etc/ssh/sshd_config.d/*.conf

PubkeyAuthentication yes

PasswordAuthentication no

ChallengeResponseAuthentication no

KbdInteractiveAuthentication no

UsePAM no

AllowAgentForwarding yes
X11Forwarding yes
PrintMotd no

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

<!-- gh-comment-id:2162837402 --> @glolsh commented on GitHub (Jun 12, 2024): Second to this. I have clean Hetzner cloud server with key-only ssh auth. Getting error too. I have these **enabled** ssh settings (/etc/ssh/sshd_config): Include /etc/ssh/sshd_config.d/*.conf PubkeyAuthentication yes PasswordAuthentication no ChallengeResponseAuthentication no KbdInteractiveAuthentication no UsePAM no AllowAgentForwarding yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server
Author
Owner

@glolsh commented on GitHub (Jun 13, 2024):

Solved this issue by switching to ed25519

<!-- gh-comment-id:2165442791 --> @glolsh commented on GitHub (Jun 13, 2024): Solved this issue by switching to ed25519
Author
Owner

@OpFab123 commented on GitHub (Jun 14, 2024):

Im using a clean unbuntu server minimal VM on proxmox, located at my home (the main use case for the vpn is sneaking around my schools blocking).
The root Users not properly setup (has no password, but thats standart on ubuntu), so im using a custom username with sudo access.
And the error accours with both the local ip and public ip.

<!-- gh-comment-id:2168301522 --> @OpFab123 commented on GitHub (Jun 14, 2024): Im using a clean unbuntu server minimal VM on proxmox, located at my home (the main use case for the vpn is sneaking around my schools blocking). The root Users not properly setup (has no password, but thats standart on ubuntu), so im using a custom username with sudo access. And the error accours with both the local ip and public ip.
Author
Owner

@OpFab123 commented on GitHub (Jun 14, 2024):

Bruh i didnt mean to close this thread

<!-- gh-comment-id:2168302383 --> @OpFab123 commented on GitHub (Jun 14, 2024): Bruh i didnt mean to close this thread
Author
Owner

@nastyagrifon commented on GitHub (Jun 14, 2024):

Had the same issue, here's what worked for me:

After running Linux client to configure the server I've noticed that script runs

CUR_USER=$(whoami)
sudo mkdir -p /opt/amnezia/amnezia-awg
sudo chown $CUR_USER /opt/amnezia/amnezia-awg

After that, the installation fails with SSH error 300, while the stdout says

"SCP: Warning: status code 1 received: scp: /opt/amnezia/amnezia-awg/Dockerfile: No such file or directory\n"

Indeed, the folder /opt/amnezia does not exist. Let's create it manually then! Just run on your target server this:

export CUR_USER=$(whoami) && sudo mkdir -p /opt/amnezia/amnezia-awg && sudo chown $CUR_USER /opt/amnezia/amnezia-awg

Make sure you log in with the same user as you've put in the AmneziaVPN client. Can't say if that can cause issues, but I believe the CUR_USER variable is there for a reason

After that the error 300 is gone and installation process goes as usual. Not sure why this happens, hope this helps someone

<!-- gh-comment-id:2168419166 --> @nastyagrifon commented on GitHub (Jun 14, 2024): Had the same issue, here's what worked for me: After running Linux client to configure the server I've noticed that script runs ``` CUR_USER=$(whoami) sudo mkdir -p /opt/amnezia/amnezia-awg sudo chown $CUR_USER /opt/amnezia/amnezia-awg ``` After that, the installation fails with SSH error 300, while the stdout says ``` "SCP: Warning: status code 1 received: scp: /opt/amnezia/amnezia-awg/Dockerfile: No such file or directory\n" ``` Indeed, the folder /opt/amnezia does not exist. Let's create it manually then! Just run on your target server this: ``` export CUR_USER=$(whoami) && sudo mkdir -p /opt/amnezia/amnezia-awg && sudo chown $CUR_USER /opt/amnezia/amnezia-awg ``` Make sure you log in with the same user as you've put in the AmneziaVPN client. Can't say if that can cause issues, but I believe the CUR_USER variable is there for a reason After that the error 300 is gone and installation process goes as usual. Not sure why this happens, hope this helps someone
Author
Owner

@lunardunno commented on GitHub (Jun 15, 2024):

Have you configured this server before, but under a different user?

<!-- gh-comment-id:2170532443 --> @lunardunno commented on GitHub (Jun 15, 2024): Have you configured this server before, but under a different user?
Author
Owner

@nastyagrifon commented on GitHub (Jun 17, 2024):

In my case error never occurs when using root user. Entering any other low-priv user results in this issue, even if that user is in the sudo group

<!-- gh-comment-id:2173547894 --> @nastyagrifon commented on GitHub (Jun 17, 2024): In my case error never occurs when using root user. Entering any other low-priv user results in this issue, even if that user is in the sudo group
Author
Owner

@lunardunno commented on GitHub (Jun 18, 2024):

In my case error never occurs when using root user. Entering any other low-priv user results in this issue, even if that user is in the sudo group

The problem was that when an individual container was deleted under root, the container directory remained, and the non-root user (only sudo) could not do anything with it.

And when the entire server is cleared of the AmneziaVPN software, this folder will be deleted and the server can be configured as a non-root user (only sudo).

The fix is ​​already included in the dev branch, and will be included in the next release|pre-release.

<!-- gh-comment-id:2175725990 --> @lunardunno commented on GitHub (Jun 18, 2024): > In my case error never occurs when using root user. Entering any other low-priv user results in this issue, even if that user is in the sudo group The problem was that when an individual container was deleted under root, the container directory remained, and the non-root user (only sudo) could not do anything with it. And when the entire server is cleared of the AmneziaVPN software, this folder will be deleted and the server can be configured as a non-root user (only sudo). The fix is ​​already included in the dev branch, and will be included in the next release|pre-release.
Author
Owner

@MichaelDoronin commented on GitHub (Jun 20, 2024):

Hi guys. Same issue on windows 11 machine.
Can't ssh connect with amnezia client.
What happened?

In powershell ssh connection success...

<!-- gh-comment-id:2180100769 --> @MichaelDoronin commented on GitHub (Jun 20, 2024): Hi guys. Same issue on windows 11 machine. Can't ssh connect with amnezia client. What happened? In powershell ssh connection success...
Author
Owner

@lunardunno commented on GitHub (Jun 20, 2024):

@MichaelDoronin
Is the server new? Or was it already configured under a different user to work with AmneziaVPN?

<!-- gh-comment-id:2181490554 --> @lunardunno commented on GitHub (Jun 20, 2024): @MichaelDoronin Is the server new? Or was it already configured under a different user to work with AmneziaVPN?
Author
Owner

@ndenissov commented on GitHub (Jun 21, 2024):

I understand that this is not the best solution, but it worked for me.

sudo chmod 777 /opt/amnezia/amnezia-awg/

<!-- gh-comment-id:2182378120 --> @ndenissov commented on GitHub (Jun 21, 2024): I understand that this is not the best solution, but it worked for me. > sudo chmod 777 /opt/amnezia/amnezia-awg/
Author
Owner

@MichaelDoronin commented on GitHub (Jun 22, 2024):

@MichaelDoronin Is the server new? Or was it already configured under a different user to work with AmneziaVPN?

yes, new cloud ubuntu machine from provider. even i tried install amnezia on my android phone - same result.

but now, i created manual wireguard configuration on the same server in terminal and it works for me
https://upcloud.com/resources/tutorials/get-started-wireguard-vpn

<!-- gh-comment-id:2183914736 --> @MichaelDoronin commented on GitHub (Jun 22, 2024): > @MichaelDoronin Is the server new? Or was it already configured under a different user to work with AmneziaVPN? yes, new cloud ubuntu machine from provider. even i tried install amnezia on my android phone - same result. but now, i created manual wireguard configuration on the same server in terminal and it works for me https://upcloud.com/resources/tutorials/get-started-wireguard-vpn
Author
Owner

@lunardunno commented on GitHub (Jun 22, 2024):

I understand that this is not the best solution, but it worked for me.

sudo chmod 777 /opt/amnezia/amnezia-awg/

The reason for this problem was that /opt/amnezia/amnezia-awg/ was initially created under the root user. And having deleted the container, but without clearing the server of all AmneizaVPN protocols and services, they began to configure the server under a different user.

Corrected in
https://github.com/amnezia-vpn/amnezia-client/actions/runs/9157401644

<!-- gh-comment-id:2184027957 --> @lunardunno commented on GitHub (Jun 22, 2024): > I understand that this is not the best solution, but it worked for me. > > > sudo chmod 777 /opt/amnezia/amnezia-awg/ The reason for this problem was that /opt/amnezia/amnezia-awg/ was initially created under the root user. And having deleted the container, but without clearing the server of all AmneizaVPN protocols and services, they began to configure the server under a different user. Corrected in https://github.com/amnezia-vpn/amnezia-client/actions/runs/9157401644
Author
Owner

@Zerogoki00 commented on GitHub (Jul 6, 2024):

I have the same problem. The only solution was login as root AND with password. Any other options (different users with/or public key) lead to errors.
This needs to be fixed

<!-- gh-comment-id:2211714816 --> @Zerogoki00 commented on GitHub (Jul 6, 2024): I have the same problem. The only solution was login as root AND with password. Any other options (different users with/or public key) lead to errors. This needs to be fixed
Author
Owner

@AegeanBlue commented on GitHub (Aug 6, 2024):

Have the same error, creating /opt/amnezia/amnezia-awg/ seems to fix the issue, but it also replicates whenever I try to install new protocol

<!-- gh-comment-id:2271785882 --> @AegeanBlue commented on GitHub (Aug 6, 2024): Have the same error, creating /opt/amnezia/amnezia-awg/ seems to fix the issue, but it also replicates whenever I try to install new protocol
Author
Owner

@Daniil-Solovyev commented on GitHub (Aug 8, 2024):

Amnesia only supports RSA keys with PEM, and ed25519

Examples of the line to generate:
ssh-keygen -t rsa -m PEM -b 2048
ssh-keygen -t rsa -m PEM -b 3072
ssh-keygen -t rsa -m PEM -b 4096
ssh-keygen -t ed25519

<!-- gh-comment-id:2276691642 --> @Daniil-Solovyev commented on GitHub (Aug 8, 2024): Amnesia only supports RSA keys with PEM, and ed25519 Examples of the line to generate: ssh-keygen -t rsa -m PEM -b 2048 ssh-keygen -t rsa -m PEM -b 3072 ssh-keygen -t rsa -m PEM -b 4096 ssh-keygen -t ed25519
Author
Owner

@phonoarchive commented on GitHub (Sep 16, 2024):

I have a Servarica VPS and iPhone, trying to login as root via ssh private key option, getting error 300: SSH request was denied. Tried to generate all type of keys, et25519 also... no result.

<!-- gh-comment-id:2352888103 --> @phonoarchive commented on GitHub (Sep 16, 2024): I have a Servarica VPS and iPhone, trying to login as root via ssh private key option, getting error 300: SSH request was denied. Tried to generate all type of keys, et25519 also... no result.
Author
Owner

@WeAreLiving1984 commented on GitHub (Oct 11, 2024):

I had problem when setting up non root user (with disabled root login on ssh), here how I solved it on debian:

# just to make sure
sudo usermod -aG sudo non-root-user
sudo visudo
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
<!-- gh-comment-id:2406250217 --> @WeAreLiving1984 commented on GitHub (Oct 11, 2024): I had problem when setting up non root user (with disabled root login on ssh), here how I solved it on debian: ```sh # just to make sure sudo usermod -aG sudo non-root-user ``` ```sh sudo visudo ``` ``` %sudo ALL=(ALL:ALL) NOPASSWD:ALL ```
Author
Owner

@boibibifd commented on GitHub (Nov 8, 2024):

The fix is ​​already included in the dev branch, and will be included in the next release|pre-release.

It's been more than 5 months, what are the results?

<!-- gh-comment-id:2465874305 --> @boibibifd commented on GitHub (Nov 8, 2024): > The fix is ​​already included in the dev branch, and will be included in the next release|pre-release. It's been more than 5 months, what are the results?
Author
Owner

@boibibifd commented on GitHub (Nov 9, 2024):

Full default ubuntu 22.04 with sudo user

image
image

<!-- gh-comment-id:2466094934 --> @boibibifd commented on GitHub (Nov 9, 2024): Full default ubuntu 22.04 with sudo user ![image](https://github.com/user-attachments/assets/bbc5ba69-5ab7-4ce3-bfbe-90724052a472) ![image](https://github.com/user-attachments/assets/06217bf3-3f28-4a8b-acf0-ae3ac8da8a2f)
Author
Owner

@Kyogre commented on GitHub (Nov 9, 2024):

Had the same problem. ErrorCode: 300 + error critical "Access denied for 'password'. Authentication that can continue: publickey,password" in logs.

After some time I got it solved.

  1. Generate ed25519 key (can even specify a passphrase) and write its public key to authorized_keys as usual.
  2. Open your private key and copy whole content!!! Don't change nothing, just select all and copy. Copied content must look like this:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABBN8MM11I
aAo+GM5GATJr5bAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIMcLIJd1GMCJcBIN
0OxaM47OzvIInUzZ8961VK0+lOiHAAAAoDrWOBq2lJE+RNSwp04qrCk06tJ+FiJzAYTbnt
yhjDe0zRzc2sYxOWijZPjoeZ4DhW1ZRhT/Z+vFsCQ6Nf6ydRFv26ajuzE7nYA/J+sg8ldD
vWiIltE3xdOOHumT/GDaZyF03TEh+keOzTWSBaX7TonxkMnif1WjVNamwUg6XEfj5ltech
EibzVrqf0u7T32yGHA0YWbCWv8BL23mS6Ag3U=
-----END OPENSSH PRIVATE KEY-----

  1. Paste that whole content (yes yes, that multiline content with headers) into Amnezia client password/key field.
  2. Now you can connect.
<!-- gh-comment-id:2466174391 --> @Kyogre commented on GitHub (Nov 9, 2024): Had the same problem. `ErrorCode: 300` + error `critical "Access denied for 'password'. Authentication that can continue: publickey,password"` in logs. After some time I got it solved. 1. Generate `ed25519` key (can even specify a passphrase) and write its public key to `authorized_keys` as usual. 2. Open your private key and copy whole content!!! Don't change nothing, just select all and copy. Copied content must look like this: ``` -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABBN8MM11I aAo+GM5GATJr5bAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIMcLIJd1GMCJcBIN 0OxaM47OzvIInUzZ8961VK0+lOiHAAAAoDrWOBq2lJE+RNSwp04qrCk06tJ+FiJzAYTbnt yhjDe0zRzc2sYxOWijZPjoeZ4DhW1ZRhT/Z+vFsCQ6Nf6ydRFv26ajuzE7nYA/J+sg8ldD vWiIltE3xdOOHumT/GDaZyF03TEh+keOzTWSBaX7TonxkMnif1WjVNamwUg6XEfj5ltech EibzVrqf0u7T32yGHA0YWbCWv8BL23mS6Ag3U= -----END OPENSSH PRIVATE KEY----- ``` 3. Paste that whole content (yes yes, that multiline content with headers) into Amnezia client password/key field. 4. Now you can connect.
Author
Owner

@lunardunno commented on GitHub (Nov 10, 2024):

Full default ubuntu 22.04 with sudo user

What will be output when executing this line in the console under the user intended for AmneziaVPN?

sudo -nu $(whoami) sudo 2>&1 -n uname

<!-- gh-comment-id:2466790049 --> @lunardunno commented on GitHub (Nov 10, 2024): > Full default ubuntu 22.04 with sudo user What will be output when executing this line in the console under the user intended for AmneziaVPN? sudo -nu $(whoami) sudo 2>&1 -n uname
Author
Owner

@dublewesha commented on GitHub (Dec 3, 2024):

Got a similar error after rebooting the VPS server. The reason was that the docker daemon could not start automatically after rebooting the server.
What helped me was manually starting the docker with the command:
systemctl start docker

<!-- gh-comment-id:2515497579 --> @dublewesha commented on GitHub (Dec 3, 2024): Got a similar error after rebooting the VPS server. The reason was that the docker daemon could not start automatically after rebooting the server. What helped me was manually starting the docker with the command: systemctl start docker
Author
Owner

@dcavni commented on GitHub (Dec 19, 2024):

It looks like the problem is with the fact, that server requires sudo password again after login and app doesn't have the ability to enter it. I made a bypass using this added on the end of the file (be very careful while editing this):

In terminal run the visudo command to edit the sudoers file:

sudo visudo
and add the following line to the sudoers list

username ALL = NOPASSWD : ALL
Note: Replace username with your real UserName in above line

I also got docker error while installing, i think it's Error 203. I solved this using install from apt repository (for Ubuntu server):

https://docs.docker.com/engine/install/ubuntu/

<!-- gh-comment-id:2555304492 --> @dcavni commented on GitHub (Dec 19, 2024): It looks like the problem is with the fact, that server requires sudo password again after login and app doesn't have the ability to enter it. I made a bypass using this added on the end of the file (be very careful while editing this): In terminal run the visudo command to edit the sudoers file: sudo visudo and add the following line to the sudoers list username ALL = NOPASSWD : ALL Note: Replace username with your real UserName in above line I also got docker error while installing, i think it's Error 203. I solved this using install from apt repository (for Ubuntu server): https://docs.docker.com/engine/install/ubuntu/
Author
Owner

@AbdElhalim12 commented on GitHub (Jul 2, 2025):

Had the same problem. ErrorCode: 300 + error critical "Access denied for 'password'. Authentication that can continue: publickey,password" in logs.

After some time I got it solved.

  1. Generate ed25519 key (can even specify a passphrase) and write its public key to authorized_keys as usual.
  2. Open your private key and copy whole content!!! Don't change nothing, just select all and copy. Copied content must look like this:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABBN8MM11I
aAo+GM5GATJr5bAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIMcLIJd1GMCJcBIN
0OxaM47OzvIInUzZ8961VK0+lOiHAAAAoDrWOBq2lJE+RNSwp04qrCk06tJ+FiJzAYTbnt
yhjDe0zRzc2sYxOWijZPjoeZ4DhW1ZRhT/Z+vFsCQ6Nf6ydRFv26ajuzE7nYA/J+sg8ldD
vWiIltE3xdOOHumT/GDaZyF03TEh+keOzTWSBaX7TonxkMnif1WjVNamwUg6XEfj5ltech
EibzVrqf0u7T32yGHA0YWbCWv8BL23mS6Ag3U=
-----END OPENSSH PRIVATE KEY-----
  1. Paste that whole content (yes yes, that multiline content with headers) into Amnezia client password/key field.
  2. Now you can connect.

This Worked for me

<!-- gh-comment-id:3027236486 --> @AbdElhalim12 commented on GitHub (Jul 2, 2025): > Had the same problem. `ErrorCode: 300` + error `critical "Access denied for 'password'. Authentication that can continue: publickey,password"` in logs. > > After some time I got it solved. > > 1. Generate `ed25519` key (can even specify a passphrase) and write its public key to `authorized_keys` as usual. > 2. Open your private key and copy whole content!!! Don't change nothing, just select all and copy. Copied content must look like this: > > ``` > -----BEGIN OPENSSH PRIVATE KEY----- > b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABBN8MM11I > aAo+GM5GATJr5bAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIMcLIJd1GMCJcBIN > 0OxaM47OzvIInUzZ8961VK0+lOiHAAAAoDrWOBq2lJE+RNSwp04qrCk06tJ+FiJzAYTbnt > yhjDe0zRzc2sYxOWijZPjoeZ4DhW1ZRhT/Z+vFsCQ6Nf6ydRFv26ajuzE7nYA/J+sg8ldD > vWiIltE3xdOOHumT/GDaZyF03TEh+keOzTWSBaX7TonxkMnif1WjVNamwUg6XEfj5ltech > EibzVrqf0u7T32yGHA0YWbCWv8BL23mS6Ag3U= > -----END OPENSSH PRIVATE KEY----- > ``` > > 3. Paste that whole content (yes yes, that multiline content with headers) into Amnezia client password/key field. > 4. Now you can connect. This Worked for me
Author
Owner

@YasharSL commented on GitHub (Feb 15, 2026):

Had the same problem. ErrorCode: 300 + error critical "Access denied for 'password'. Authentication that can continue: publickey,password" in logs.

After some time I got it solved.

  1. Generate ed25519 key (can even specify a passphrase) and write its public key to authorized_keys as usual.
  2. Open your private key and copy whole content!!! Don't change nothing, just select all and copy. Copied content must look like this:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABBN8MM11I
aAo+GM5GATJr5bAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIMcLIJd1GMCJcBIN
0OxaM47OzvIInUzZ8961VK0+lOiHAAAAoDrWOBq2lJE+RNSwp04qrCk06tJ+FiJzAYTbnt
yhjDe0zRzc2sYxOWijZPjoeZ4DhW1ZRhT/Z+vFsCQ6Nf6ydRFv26ajuzE7nYA/J+sg8ldD
vWiIltE3xdOOHumT/GDaZyF03TEh+keOzTWSBaX7TonxkMnif1WjVNamwUg6XEfj5ltech
EibzVrqf0u7T32yGHA0YWbCWv8BL23mS6Ag3U=
-----END OPENSSH PRIVATE KEY-----
  1. Paste that whole content (yes yes, that multiline content with headers) into Amnezia client password/key field.
  2. Now you can connect.

worked for me too
Also this may be a helpful detail: My server's SSH was configured so that even if you have an ssh key and you are a known host, it requests user password on login.

<!-- gh-comment-id:3904270862 --> @YasharSL commented on GitHub (Feb 15, 2026): > Had the same problem. `ErrorCode: 300` + error `critical "Access denied for 'password'. Authentication that can continue: publickey,password"` in logs. > > After some time I got it solved. > > 1. Generate `ed25519` key (can even specify a passphrase) and write its public key to `authorized_keys` as usual. > 2. Open your private key and copy whole content!!! Don't change nothing, just select all and copy. Copied content must look like this: > > ``` > -----BEGIN OPENSSH PRIVATE KEY----- > b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABBN8MM11I > aAo+GM5GATJr5bAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIMcLIJd1GMCJcBIN > 0OxaM47OzvIInUzZ8961VK0+lOiHAAAAoDrWOBq2lJE+RNSwp04qrCk06tJ+FiJzAYTbnt > yhjDe0zRzc2sYxOWijZPjoeZ4DhW1ZRhT/Z+vFsCQ6Nf6ydRFv26ajuzE7nYA/J+sg8ldD > vWiIltE3xdOOHumT/GDaZyF03TEh+keOzTWSBaX7TonxkMnif1WjVNamwUg6XEfj5ltech > EibzVrqf0u7T32yGHA0YWbCWv8BL23mS6Ag3U= > -----END OPENSSH PRIVATE KEY----- > ``` > > 3. Paste that whole content (yes yes, that multiline content with headers) into Amnezia client password/key field. > 4. Now you can connect. worked for me too Also this may be a helpful detail: My server's SSH was configured so that even if you have an ssh key and you are a known host, it requests user password on login.
Author
Owner

@GinnyB0Y commented on GitHub (Feb 19, 2026):

@YasharSL on my ssh connection requiers password. I insert password from my server (where root - is login), but it doesn't work. Where I can find password?

<!-- gh-comment-id:3927175674 --> @GinnyB0Y commented on GitHub (Feb 19, 2026): @YasharSL on my ssh connection requiers password. I insert password from my server (where root - is login), but it doesn't work. Where I can find password?
Author
Owner

@PhilosopherRUS commented on GitHub (Mar 1, 2026):

Fix for Error 300: SshRequestDeniedError (Amnezia VPN, Ubuntu 24.04):

The problem was caused by SSH password authentication being disabled in an additional config file. Even if /etc/ssh/sshd_config contains PermitRootLogin yes and PasswordAuthentication yes, Ubuntu 24.04 can override these settings via files in /etc/ssh/sshd_config.d/. One of those files had PasswordAuthentication no, which prevented Amnezia from logging in via password.

Fix: check ls /etc/ssh/sshd_config.d/, open the files with sudo nano /etc/ssh/sshd_config.d/*, change PasswordAuthentication no to PasswordAuthentication yes (then save), then run sudo systemctl restart ssh. After that, the installation proceeds normally. Win!

<!-- gh-comment-id:3980737048 --> @PhilosopherRUS commented on GitHub (Mar 1, 2026): Fix for Error 300: SshRequestDeniedError (Amnezia VPN, Ubuntu 24.04): The problem was caused by SSH password authentication being disabled in an additional config file. Even if /etc/ssh/sshd_config contains PermitRootLogin yes and PasswordAuthentication yes, Ubuntu 24.04 can override these settings via files in /etc/ssh/sshd_config.d/. One of those files had PasswordAuthentication no, which prevented Amnezia from logging in via password. Fix: check ls /etc/ssh/sshd_config.d/, open the files with sudo nano /etc/ssh/sshd_config.d/*, change PasswordAuthentication no to PasswordAuthentication yes (then save), then run sudo systemctl restart ssh. After that, the installation proceeds normally. Win!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#222
No description provided.