0

This sort of thing drives me crazy - hopefully obvious solution(s). Have keys on Win 10 laptop, and on one of my Linux servers. If I use puTTY, where I can explicitly browse to the keyfile on the laptop, works perfectly.

But, not luck at all using ssh from CL with key exchange. And, this is where I'm stuck...

1\ Linux server using a non-standard port (say, 1234). Suppose username on Linux server is bob.

2\ if I use simple password authentication, and not key exchange, then

ssh -p 1234 [email protected] 

works perfectly.

3\ but, if I try to ssh from the command line, pointing at the keyfile, no such luck. The user directory on the laptop has a space (say, c:\users\Bob Jones...), which might be part of the problem (or not). The ppk (which I'll call server.ppk) is in c:\users\Bob Jones.ssh

So, in theory, the following should work (again, in theory...)

ssh -i "C:\Users\Bob Jones/.ssh/server" [email protected] -p 1234 

But...no luck. The preceding (and the various permutations I've tried) throws errors like:

 Warning: Identity file C:\Users\Bob Jones/.ssh/server' not accessible: No such file or directory. [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). 

So, what obvious thing am I missing? Keyfile is there, and works perfectly using puTTY, where I can uses the GUI to explicitly point at the key. But danged if I can figure out how to get things to work using the CL.

Thanks in advance...

1
  • OpenSSH doesn't use PPK files. The PPK format is only used by PuTTY -- and PuTTY pieces like pscp or derivatives like KiTTY and WinSCP or some other things like Java jsch. For the ssh[.exe] program (a port of OpenSSH) you must supply a keyfile in OpenSSH format. You can use PuTTYgen to convert from PPK to OpenSSH format(s). Traditionally OpenSSH privatekey files have no extension (like id_rsa) (and publickey files have .pub or -cert if applicable) but you can use any name you like as long as you use the same name in ssh -i. Commented Jan 24, 2024 at 4:17

1 Answer 1

0

Does windows understand "C:\Users\Bob Jones/.ssh/server" vs "C:\Users\Bob Jones.ssh\server.ppk"

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.