I'm on Windows 10, using an OpenSSH client to connect to a Debian server.
All my keys are stored in C:\Users\entityinarray\.ssh\
PS C:\Users\entityinarray> ssh root@192.168.1.100root@192.168.1.100: Permission denied (publickey).PS C:\Users\entityinarray> ssh root@192.168.1.100 -o IdentityFile=~\.ssh\id_okcomputerEnter passphrase for key 'C:\Users\entityinarray/\.ssh\id_okcomputer':Linux okserver 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64The programs included with the Debian GNU/Linux system are free software;the exact distribution terms for each program are described in theindividual files in /usr/share/doc/*/copyright.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extentpermitted by applicable law.Last login: Wed Feb 7 09:55:39 2024 from 192.168.1.2root@okserver:~#
Passing down IdentityFile=~\.ssh\id_okcomputer
works! But I want it to find keys automatically.
My ~\.ssh\config
:
Host example.com HostName example.com Port 22 IdentityFile ~/.ssh/id_okcomputerHost radio.example.com HostName radio.example.com Port 2022 IdentityFile ~/.ssh/id_okcomputerHost linux-gaming HostName 123.123.123.123 Port 22 IdentityFile ~/.ssh/id_okcomputer