[Bug] Public key authentication not working in version 3
See original GitHub issueHi!
I set up emberstack/sftp as an Azure container Instance. I tried to configure public key authentication, but as soon as I set the password to ""
or null
I can’t login anymore.
Here is my configuration:
{
"Global": {
"Chroot": {
"Directory": "%h",
"StartPath": "sftp"
},
"Directories": [
"sftp"
],
"HostKeys": {
"Ed25519": "[MY HOST ED25519 PRIVATE KEY]",
"Rsa": "[MY HOST RSA PRIVATE KEY]"
}
},
"Users": [
{
"Username": "myuser",
"Password": "",
"PublicKeys": [
"[MY USER PUBLIC KEY]"
]
}
]
}
Log output when using sshfs
:
2020-06-19 14:41:05.388 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - PAM: Authentication failure for myuser from 10.240.255.56
2020-06-19 14:41:05.455 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - Connection closed by authenticating user myuser 10.240.255.56 port 46479 [preauth]
2020-06-19 14:41:18.675 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - PAM: Authentication failure for myuser from 10.240.255.56
2020-06-19 14:41:20.855 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - PAM: Authentication failure for myuser from 10.240.255.56
2020-06-19 14:41:20.895 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - Postponed keyboard-interactive for myuser from 10.240.255.56 port 59492 ssh2 [preauth]
2020-06-19 14:41:23.242 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - PAM: Authentication failure for myuser from 10.240.255.56
2020-06-19 14:41:23.589 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - Failed none for myuser from 10.240.255.56 port 59492 ssh2
2020-06-19 14:41:24.117 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - Failed password for myuser from 10.240.255.56 port 59492 ssh2
2020-06-19 14:41:24.126 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - maximum authentication attempts exceeded for myuser from 10.240.255.56 port 59492 ssh2 [preauth]
2020-06-19 14:41:24.126 [VRB] (ES.SFTP.Host.SSH.SSHService) sshd - Disconnecting authenticating user myuser 10.240.255.56 port 59492: Too many authentication failures [preauth]
When I use Filezilla, more or less the same thing happens.
EDIT: shortened log
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How to Troubleshoot SSH Authentication Issues
This walkthrough covers the two most common: password and private/public key pair. Prerequisites to Troubleshooting SSH Issues.
Read more >Can't get SSH public key authentication to work [closed]
I had a similar problem - remote PC couldn't use public key authentication to log in to CentOs 6 server. The problem in...
Read more >Troubleshoot SSH Key Authentication Issues | Linode Docs
Learn the basics of SSH keys and how to troubleshoot the most common SSH permission issues in this short guide.
Read more >SSH-Key authentication fails
This will usually resolve most SSH authorized key permission issues on the server side, assuming someone didn't make additional changes to ...
Read more >Public Key authentication issues with Linux / Unix SSH client.
When trying to import an SSH user key from a Linux client, I get an error: "Save Error. Failed to import RSA/DSA Key."...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tibarix feature was added in 2.0.12
@antoinedeschenes @josefschabasser - Fixed the issue by setting home directory permissions to 711. I do not want to set them to
755
unless there’s very good reasons to. I’ve tested this and it works with public keys now. Give it a spin if you can and if the problem persists, reopen the issue please.