# SFTP without SSH fails if SSH in "no password" mode

**URL:** https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209
**Category:** Support
**Tags:** ssh, bug, english
**Created:** [May 6, 2026, 5:15pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209 "2026-05-06T17:15:12Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![PP44](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pp44/32/1779_2.png) [@PP44](https://forum.yunohost.org/u/PP44)
#### Post date: [May 6, 2026, 5:15pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/1 "2026-05-06T17:15:12Z")

</div>

**What type of hardware are you using** : Old laptop or computer  
**What YunoHost version are you running** : 12.1.39  
**How are you able to access your server** : The webadmin  
SSH  
Direct access via physical keyboard/screen  
**Are you in a special context or did you perform specific tweaking on your YunoHost instance ?** : I connect via ssh using the “no password only” mode, only authentication via keyfile is authorized.

### Describe your issue

Hi everyone !

TL;DR : user with sftp permission but no ssh cannot connect if password authentication for ssh is not allowed.

I have granted stfp permission to a non-admin user, but not ssh. I then activated the “password authentication” mode and uploaded my keyfile using ssh-copy-id, which went as expected. The upload was followed by the message “This service allows sftp connections only.”, which is coherent with the authorization I granted to this user.  
But after the fact, have the following behavior :

- “password authentication” no allowed : command line and filezilla send the same kind of error :
  - Filezilla  
`FATAL ERROR: No supported authentication methods available (server sent: publickey)`
  - Command line :  
`Permission denied (publickey)`

- “password authentication” no allowed : command line and filezilla send the same kind of error :
  - Filezilla : Connects without asking for a password
  - Command line : Ask the password and then connects

Is this an intended behavior ? Is there a way to fix it ? Thank you for your attention, sorry for the **very** specific usecase ! ❤

### Share relevant logs or error messages

FileZilla :  
`FATAL ERROR: No supported authentication methods available (server sent: publickey)`  
sftp command :  
`Permission denied (publickey)`

---

<div class="post-metadata">

### Author: ![PP44](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pp44/32/1779_2.png) [@PP44](https://forum.yunohost.org/u/PP44)
#### Post date: [May 7, 2026, 4:04pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/2 "2026-05-07T16:04:35Z")

</div>

Additional info that was implied but not made clear:

This issue does not affect an admin account that has full ssh access via keyfile only.

---

<div class="post-metadata">

### Author: ![JfmbLinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jfmblinux/32/11238_2.png) [@JfmbLinux](https://forum.yunohost.org/u/JfmbLinux)
#### Post date: [May 8, 2026, 8:47am UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/3 "2026-05-08T08:47:37Z")

</div>

Can that match your problem?

> **[Comment activer SFTP sans accès shell sur Ubuntu 16.04](https://www.linux-fra.com/?p=10229)**

---

<div class="post-metadata">

### Author: ![PP44](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pp44/32/1779_2.png) [@PP44](https://forum.yunohost.org/u/PP44)
#### Post date: [May 8, 2026, 8:14pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/4 "2026-05-08T20:14:36Z")

</div>

I am not sure I fully understand this solution. My understanding is that this solution implies building a specific folder (or even folder structure) with very specific ownerships and permissions. I would like to be able to access the home directory of the user. Is there a fundamental thing that would prevent this access. I know next to nothing about ssh or sftp 😅

Also, I don’t understand what is the purpose of the “sftp” permission (separate from ssh) in yunohost (command line or web ui) if not to access the home folder. Hence my tag oif this post as a bug because this appeared to me as the first usage I could think of.

Thank you very much for your help, time and attention !

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [May 8, 2026, 9:15pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/5 "2026-05-08T21:15:55Z")

</div>

Ssh to your server then run

`sudo yunohost tools basic-space-cleanup `

Then `sudo apt install ncdu -y`

Then run `ncdu / -x`

You’ll be able to do some cleanup using ncdu.

Note that it’s not recommended to delete files in data folder of nextcloud manually

---

<div class="post-metadata">

### Author: ![PP44](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pp44/32/1779_2.png) [@PP44](https://forum.yunohost.org/u/PP44)
#### Post date: [May 8, 2026, 9:41pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/6 "2026-05-08T21:41:55Z")

</div>

I don’t really see how that is related to my issue, am I missing something ?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [May 8, 2026, 9:43pm UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/7 "2026-05-08T21:43:14Z")

</div>

Sorry, wrong thread

---

<div class="post-metadata">

### Author: ![TimTom420](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@TimTom420](https://forum.yunohost.org/u/TimTom420)
#### Post date: [May 9, 2026, 12:08am UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/8 "2026-05-09T00:08:05Z")

</div>

This is expected behavior rather than a bug. SFTP runs over SSH as a subsystem, which means it inherits all the SSH authentication policies — including `PasswordAuthentication no`. When you restrict SSH to publickey-only, that restriction applies to ALL SSH connections, including SFTP connections made by SFTP-only users.

The solution for giving SFTP-only users password-based access while keeping SSH locked to keys would be to use `Match User` blocks in sshd\_config to override `PasswordAuthentication` specifically for that user. However, YunoHost manages sshd\_config through its own tooling, so you’d want to check if there’s a YunoHost-level way to configure per-user SFTP settings rather than editing sshd\_config directly (which might get overwritten on updates).

---

<div class="post-metadata">

### Author: ![PP44](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pp44/32/1779_2.png) [@PP44](https://forum.yunohost.org/u/PP44)
#### Post date: [May 9, 2026, 7:41am UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/9 "2026-05-09T07:41:44Z")

</div>

But that’s the thing, I don’t want password-based access for SFTP-only user. I want certificate oonly access for both SFTP-only user(s) and SSH user(s).

---

<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: [June 8, 2026, 7:42am UTC](https://forum.yunohost.org/t/sftp-without-ssh-fails-if-ssh-in-no-password-mode/42209/10 "2026-06-08T07:42:04Z")

</div>

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