SSH problems
OK - I'm not a noob, but this has me tearing my hair out.
Recently downloaded the latest OS (Oct 1 2025 Debian trixie?) to run on both a Pi4 and Pi5 in order to set up some automation stuff.
I normally work 'headless' and use ssh and/or WinSCP to access the Pi's. from a desktop PC running Win11.
However all I now get is:
Login prompt: (I enter valid username)
then ...
""No supported authentication methods available (server sent: publickey)", of course I am then dumped out.
I just don't seem to be able to get my head around how to get past this point, and this happens on both Pi's.
I still have access to Pi's running the older version of the OS - this is just a problem I have with the latest.
Can anyone talk me through what to do here? Pretty Please ...
Ron
Recently downloaded the latest OS (Oct 1 2025 Debian trixie?) to run on both a Pi4 and Pi5 in order to set up some automation stuff.
I normally work 'headless' and use ssh and/or WinSCP to access the Pi's. from a desktop PC running Win11.
However all I now get is:
Login prompt: (I enter valid username)
then ...
""No supported authentication methods available (server sent: publickey)", of course I am then dumped out.
I just don't seem to be able to get my head around how to get past this point, and this happens on both Pi's.
I still have access to Pi's running the older version of the OS - this is just a problem I have with the latest.
Can anyone talk me through what to do here? Pretty Please ...
Ron
Re: SSH problems
Have you checked whether your ~/.ssh/authorized_keys file is correct ?
Have you checked whether your /etc/ssh/sshd_config is set to allow pubkey authentication ?
Can you login with your password ?
Have you thought about restarting ssh service if you modified some settings ?
I know it's all basic stuff, but worth double checking imho
Have you checked whether your /etc/ssh/sshd_config is set to allow pubkey authentication ?
Can you login with your password ?
Have you thought about restarting ssh service if you modified some settings ?
Code: Select all
systemctl restart sshMostly IT & Live Video Production
Check my photographer's portfolio : https://dwampix.kavyar.site/
Check my photographer's portfolio : https://dwampix.kavyar.site/
Re: SSH problems
Double check that your public key in ~/.ssh/authorized_keys is not between "quotes"
Imager used to do this at some point
Imager used to do this at some point
Mostly IT & Live Video Production
Check my photographer's portfolio : https://dwampix.kavyar.site/
Check my photographer's portfolio : https://dwampix.kavyar.site/
Re: SSH problems
Thanks both ... especially for the quick response.
I have checked as you suggested. Certainly the Publickeyauthentication in config was not correct. Corrected and restarted ssh but to no avail. I checked for inadvertent quotes - but there were none.
I didn't mention I am trying to use Putty and WinSCP, not just ssh from the PC. Currently I am have VNC activated - but I don't really want to work that way forever.
It's very frustrating ... and vexing.
rgds
I have checked as you suggested. Certainly the Publickeyauthentication in config was not correct. Corrected and restarted ssh but to no avail. I checked for inadvertent quotes - but there were none.
I didn't mention I am trying to use Putty and WinSCP, not just ssh from the PC. Currently I am have VNC activated - but I don't really want to work that way forever.
It's very frustrating ... and vexing.
rgds
Re: SSH problems
Quick update ...
I used ssh on the PC to connect, and after the usual warnings about ED255519 key not being known by any other name .. it connected without issue.
I tried again using Putty - no change still won't connect. And I'm guessing that is the same problem with WinSCP which also won't allow connection.
Aaaaaaaaah!!
I used ssh on the PC to connect, and after the usual warnings about ED255519 key not being known by any other name .. it connected without issue.
I tried again using Putty - no change still won't connect. And I'm guessing that is the same problem with WinSCP which also won't allow connection.
Aaaaaaaaah!!
Re: SSH problems
Putty ? So you're using Putty's weird keys ? .ppk ?
Why don't you try generating a standard key pair directly in windows and see if it works ? I'm not sure this is the reason but it takes 1 or 2 minutes to test so you know...
ed25519 format is the way to go these days
And a personal advice (for later) : check mobaxterm instead of using Putty and WinSCP. mobaxterm offers all in one and so much more !
https://mobaxterm.mobatek.net/
Why don't you try generating a standard key pair directly in windows and see if it works ? I'm not sure this is the reason but it takes 1 or 2 minutes to test so you know...
ed25519 format is the way to go these days
And a personal advice (for later) : check mobaxterm instead of using Putty and WinSCP. mobaxterm offers all in one and so much more !
https://mobaxterm.mobatek.net/
Mostly IT & Live Video Production
Check my photographer's portfolio : https://dwampix.kavyar.site/
Check my photographer's portfolio : https://dwampix.kavyar.site/
Re: SSH problems
Oh I posted my last idea right after your last message
Glad it works now
And really check mobaxterm. Putty is a prehistoric tool now
Glad it works now
And really check mobaxterm. Putty is a prehistoric tool now
Mostly IT & Live Video Production
Check my photographer's portfolio : https://dwampix.kavyar.site/
Check my photographer's portfolio : https://dwampix.kavyar.site/
Re: SSH problems
try
Code: Select all
chmod 700 ~/.ssh
sudo chmod 640 ~/.ssh/authorized_keys
sudo chown $USER~/.ssh
sudo chown $USER ~/.ssh/authorized_keysRe: SSH problems
Have you got a recent/current version of PuTTY for Windows?
(I have a vague recollection that I encountered an issue where something related to ssh keys had moved forward on the RasPiOS end and had left the PuTTY implementation incompatible.)
PuTTY Release 0.81 allows me to connect from a Win10 Home workstation to an RPi target running 64-bit RasPiOS Bookworm: I'll try to retest with RasPiOS 'Trixie'.
{Edit: updated subsequently - }
I can confirm that my Win10 Home workstation running PuTTY 0.81 is able to establish a working ssh login with a target RPi running 64-bit RasPiOS Trixie. Works with both username/password and keyed (passwordless) authentication.
Last edited by B.Goode on Wed Nov 05, 2025 7:57 am, edited 1 time in total.
Beware of the Leopard
Re: SSH problems
This forum gives a warning if there is an intervening post. Even if you miss that, you can edit your post while it is still the last message in the thread.
Please stop following up to your own posts.
PuTTY is still actively maintained.And really check mobaxterm. Putty is a prehistoric tool now
Re: SSH problems
I've a vague recollection of this problem from about two years ago. Might have been just after an OS update (to Bookworm maybe).
From what I recall there's a setting somewhere (not sure if it's client or server side) that sets which encryption methods are used for the key exchange (not for the key itself). You need to tweak the settings so both sides allow and use the same methods. If it's server side you'll need to reboot or restart sshd after making the change.
Got that from a forum post on here so a search will probably show the details. Sorry, don't have the link to hand.
Could easily be wrong so take the above with a pinch of salt.
From what I recall there's a setting somewhere (not sure if it's client or server side) that sets which encryption methods are used for the key exchange (not for the key itself). You need to tweak the settings so both sides allow and use the same methods. If it's server side you'll need to reboot or restart sshd after making the change.
Got that from a forum post on here so a search will probably show the details. Sorry, don't have the link to hand.
Could easily be wrong so take the above with a pinch of salt.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
Re: SSH problems
So what ?
So is X...
Yet we switched to Wayland... for the exact same reason...
Mostly IT & Live Video Production
Check my photographer's portfolio : https://dwampix.kavyar.site/
Check my photographer's portfolio : https://dwampix.kavyar.site/
Re: SSH problems
We switched to Wayland because the problem is hard. Wayland solves this by simply throwing away functionality.
Oh no, not again.
Re: SSH problems
Using PuTTY 0.83 so should be OK.B.Goode wrote: ↑Tue Nov 04, 2025 5:31 pm
Have you got a recent/current version of PuTTY for Windows?
(I have a vague recollection that I encountered an issue where something related to ssh keys had moved forward on the RasPiOS end and had left the PuTTY implementation incompatible.)
PuTTY Release 0.81 allows me to connect from a Win10 Home workstation to an RPi target running 64-bit RasPiOS Bookworm: I'll try to retest with RasPiOS 'Trixie'.
{Edit: updated subsequently - }
I can confirm that my Win10 Home workstation running PuTTY 0.81 is able to establish a working ssh login with a target RPi running 64-bit RasPiOS Trixie. Works with both username/password and keyed (passwordless) authentication.
Since this is common across various (but not all) Pi's I can only assume that it is the desktop PC that is wrong. I'll keep searching.
Thanks
Re: SSH problems
Yep - sorry about that -- never asked for help before. Mobaxterm gives me the same issue, but I am beginning to believe it is the PC at fault NOT the Pi's. I'll keep investigating.jojopi wrote: ↑Tue Nov 04, 2025 5:40 pmThis forum gives a warning if there is an intervening post. Even if you miss that, you can edit your post while it is still the last message in the thread.
Please stop following up to your own posts.PuTTY is still actively maintained.And really check mobaxterm. Putty is a prehistoric tool now
Re: SSH problems
Thanks - tried it but no change.wcl55 wrote: ↑Tue Nov 04, 2025 4:50 pmtry
Code: Select all
chmod 700 ~/.ssh sudo chmod 640 ~/.ssh/authorized_keys sudo chown $USER~/.ssh sudo chown $USER ~/.ssh/authorized_keys
Re: SSH problems
OK - this time I am replying to my own post ...
I finally found the answer - I think!
As i had established that it was probably a problem with the desktop PC rather than the Pi's I am using for testing, I looked at all the replies above and decided I had to try and generate new keys for the PC (DWAM suggested this anyway - thanks!)
Excuse me if this gets boring, but it MAY help someone in the future.
1. ssh-keygen used to generate a new ed25519 key pair
2. called up PuTTy and ensured by altering 'auth' settings that it should use the new private key by specifying the relevant file generated
3. it failed but with a more informative message of 'couldn't use keyfile SSH2 new format etc
4. looked this up and found that you have to use PuTTYgen to create the .ppk version of that private keyfile
5. as 2 above but using the newly generated .ppk file, and it came to life!!!
6. tried same approach using WinSCP - but it failed .... so
7. started MobaXterm as people had recommended, ensured it would use the correct keyfile and SUCCESS!
Thanks again everybody for pointing me in the right direction. I will use MobaXterm from now on as it seems to cover most of the bases. I'll maybe try and get WinSCP going in the future as I am familiar with the interface, but for now juist happy to have got through it.
Thanks again for all your contributions.
I finally found the answer - I think!
As i had established that it was probably a problem with the desktop PC rather than the Pi's I am using for testing, I looked at all the replies above and decided I had to try and generate new keys for the PC (DWAM suggested this anyway - thanks!)
Excuse me if this gets boring, but it MAY help someone in the future.
1. ssh-keygen used to generate a new ed25519 key pair
2. called up PuTTy and ensured by altering 'auth' settings that it should use the new private key by specifying the relevant file generated
3. it failed but with a more informative message of 'couldn't use keyfile SSH2 new format etc
4. looked this up and found that you have to use PuTTYgen to create the .ppk version of that private keyfile
5. as 2 above but using the newly generated .ppk file, and it came to life!!!
6. tried same approach using WinSCP - but it failed .... so
7. started MobaXterm as people had recommended, ensured it would use the correct keyfile and SUCCESS!
Thanks again everybody for pointing me in the right direction. I will use MobaXterm from now on as it seems to cover most of the bases. I'll maybe try and get WinSCP going in the future as I am familiar with the interface, but for now juist happy to have got through it.
Thanks again for all your contributions.
Re: SSH problems
That's exactly why I stopped using Putty 5 or 6 years ago !!!
Can't rely on an app that coerces you to use its own proprietary format for something that is designed to be open and standardized ! (not to speak about its own agent etc...)
Glad mobaxterm seems to fit yout needs... If you mostly do SSH and SCP, I'm sure you understand why I recommended it to you
Bien à toi
Mostly IT & Live Video Production
Check my photographer's portfolio : https://dwampix.kavyar.site/
Check my photographer's portfolio : https://dwampix.kavyar.site/
Re: SSH problems
The problem with putty is that it's SO dirt simple. You can install it by just copying a single .exe file, or I think there's an installer. I wouldn't know because I use the first method :lol:
I wrote some detailed notes on putty and SSH keys a few years ago. Looking at it today I see that I recommended starting with puttygen when mixed SSH/puttygen keys are required.
However, at least on Linux, it's possible to use puttygen to generate it's own-format keys from SSH keys if the SSH keys are ecdsa. Generally:
Code: Select all
ssh-keygen -C comment -f /path/to/.ssh/privatekey -t ecdsa [...]
puttygen /path/to/.ssh/privatekey -O private -o /path/to/putty-key
chmod 600 /path/to/putty-key
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion