# SSH Access Denied after yunohost update

**URL:** https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089
**Category:** Support
**Tags:** update, french, english
**Created:** [December 10, 2021, 2:50am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089 "2021-12-10T02:50:08Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![nosmose](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/n/8e8cbc/32.png) [@nosmose](https://forum.yunohost.org/u/nosmose)
#### Post date: [December 10, 2021, 2:50am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/1 "2021-12-10T02:50:08Z")

</div>

Hi everyone,

**My YunoHost server**

- Hardware: VPS from Kimsufi (low end OVH service so no KWM) - Debian 10
- YunoHost version: 4.3.4.1
- I have access to my server : Through SSH (Putty) & the webadmin

After I did a system update including linux & yunohost packages yesterday , I am now unable to connect to my server via SSH terminal with my user “adminuser” that I created when first installing yunohost.  
I got an “Access Denied” after validating the password in the terminal.

Root login was already disable but I use to log with the user “adminuser” (which exist in /etc/passwd).

Thanks to [Aleks](https://forum.yunohost.org/u/aleks/summary) reponse in another [topic](https://forum.yunohost.org/t/forgot-ssh-password-for-yunohost-instance/16753) I found a way around and was able to connect with the user “admin”.

Aleks lightning solution :

> If you’re able to login to the web admin interface, then that’s the same password. Be sure to log on ssh using the `admin` user (not `root`).

Do you know why I can’t access my server with my usual user ?

Thanks for your help !

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [December 10, 2021, 5:32am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/2 "2021-12-10T05:32:20Z")

</div>

Hello, and welcome!

What was the YunoHost version before the upgrade?

Can you check that your YunoHost user has the SSH permission in the permissions panel?

* * *

YunoHost manages the ssh config file, and it may have overriden it during the upgrade. However, it should have warned you about it. The fact that you refer to /etc/passwd makes me think that you are using a user that’s not created by YunoHost. If so, try using a YNH user and give it ssh permission. If you do not want to do that, you will need to tweak the ssh config file and YNH will yell about it.

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 10, 2021, 1:08pm UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/3 "2021-12-10T13:08:28Z")

</div>

This is probably related to changes in version 4.2 where we disabled ssh login using random user. Instead, ssh login permission must be explicitly granted to specific users, which is a safer security practice:

> [@YunoHost 4.2 release / Sortie de YunoHost 4.2](https://forum.yunohost.org/t/yunohost-4-2-release-sortie-de-yunohost-4-2/15673):
>
> uk English version We are glad to announce the release of YunoHost 4.2 partying_face ! This release includes the following major changes : sunflower Rewrite of the webadmin with Vue.js: The webadmin was entirely rewrote using a modern framework, allowing for miscellanous improvement, better experience and opening the door for more cool things in the future! (Kudos to Axolotle for the outstanding amount of work that went into this!) three Python 2 → Python 3: YunoHost finally tra…

---

<div class="post-metadata">

### Author: ![nosmose](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/n/8e8cbc/32.png) [@nosmose](https://forum.yunohost.org/u/nosmose)
#### Post date: [December 10, 2021, 1:09pm UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/4 "2021-12-10T13:09:43Z")

</div>

Hi ! Thanks for your anwser.

I don’t know for sure what was the YunoHost version before the upgrade. I would guess 4.1 or 4.2. Any way I can find that information ?

As you say, none of the user I mention (root, adminuser, admin) are “created as Yunohost User”

- root and adminuser are debian user
- admin is the user to connect to the administration panel

I used to connect with adminuser (root was already forbidden) and now I can’t : Your guess must be right :

> YunoHost manages the ssh config file, and it may have overriden it during the upgrade

I can now log with the admin user (the same one I use for administration panel).  
Can you confirm that login with SSH as admin user is the right way to do it ?

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 10, 2021, 1:11pm UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/5 "2021-12-10T13:11:07Z")

</div>

> [@nosmose](#):
>
> Can you confirm that login with SSH as admin user is the right way to do it ?

Yes it is

---

<div class="post-metadata">

### Author: ![nosmose](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/n/8e8cbc/32.png) [@nosmose](https://forum.yunohost.org/u/nosmose)
#### Post date: [December 10, 2021, 1:18pm UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/6 "2021-12-10T13:18:24Z")

</div>

Thanks for that !

I try to grant SSH permission to an yunohost user and I am able to login into SSH with this user.

---

<div class="post-metadata">

### Author: ![gloomypanda](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/f4b2a3/32.png) [@gloomypanda](https://forum.yunohost.org/u/gloomypanda)
#### Post date: [December 11, 2021, 8:05am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/7 "2021-12-11T08:05:41Z")

</div>

Hi, apparently after the latest update and installation of “custom webapp” I can’t access SFTP server of this app via my\_webapp user too. This isn’t the yunohost user, just a system user with access to /var/www/my\_webapp/ dir.

edit: log from FileZilla:

| Status: | Connecting to \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*… |
| --- | --- |
| Response: | fzSftp started, protocol\_version=10 |
| Command: | open my\_webapp@\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 22 |
| Status: | Using username my\_webapp. |
| Command: | Pass: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* |
| Error: | FATAL ERROR: Remote side unexpectedly closed network connection |
| Error: | Could not connect to server |

edit2:

root@\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*:/etc/ssh# groups my\_webapp  
my\_webapp : my\_webapp sftp.app

edit3: PROBLEM SOLVED.  
Added my\_webapp user to ssh.app group - now it works. However it took me some time to realise what’s wrong and find the right solution…

---

<div class="post-metadata">

### Author: ![nosmose](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/n/8e8cbc/32.png) [@nosmose](https://forum.yunohost.org/u/nosmose)
#### Post date: [December 11, 2021, 10:23am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/8 "2021-12-11T10:23:29Z")

</div>

Hi,

Glad you could find away aroud ! I guess this change is due to 4.2 update.

You could also add SFTP permission to this user throught the administrator panel.  
Would it be a more secure way to add SFTP permission instead of SSH ?

---

<div class="post-metadata">

### Author: ![gloomypanda](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/f4b2a3/32.png) [@gloomypanda](https://forum.yunohost.org/u/gloomypanda)
#### Post date: [December 11, 2021, 10:58am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/9 "2021-12-11T10:58:22Z")

</div>

@nosmose, the SFTP permission was already set, this user was in sftp.app group.

> You could also add SFTP permission to this user throught the administrator panel.

Unfortunately this wasn’t possible, as my\_webapp is not a typical “yunohost user”.  
cat /etc/passwd:  
 ![image](https://forum.yunohost.org/uploads/default/original/2X/d/d501e57804ae17324916cb375fab6192370a6419.jpeg)  
It was created during _Custom Webapp_ instance installation, only to control access to /var/www/my\_webapp/ dir. 🙂

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [January 10, 2022, 10:58am UTC](https://forum.yunohost.org/t/ssh-access-denied-after-yunohost-update/18089/10 "2022-01-10T10:58:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
