Authenticate ssh tunnel with private key with no passphrase

Advertisement

moeck
Joined:
Posts:
3

Authenticate ssh tunnel with private key with no passphrase

Hi,
to avoid the input of the passphrase when using a private key file I generated a private key without a passphrase. When I now set the raw settings with
_sessionOptions.AddRawSettings("TunnelPublicKeyFile", _privateKeyPathNoPassPhrase);
and try to connect I get the error
"unable to use key file 'nopassphrase.ppk' (unable to open file).
If I start pageant and register the no passphrase key before trying to connect, connection succeeds.
How can I connect without using pageant?

Regards
moeck

Reply with quote

Advertisement

moeck
Joined:
Posts:
3

Re: Authenticate ssh tunnel with private key with no passphrase

martin wrote:

Did you try using a full path to the key?
No, the key file is located in a "keys"-subfolder. So the path is relative.
But it would be a surprise if this would be the problem because if I use pageant as I mentioned the connection succeeds without modifying the path.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Authenticate ssh tunnel with private key with no passphrase

moeck wrote:

martin wrote:

Did you try using a full path to the key?
No, the key file is located in a "keys"-subfolder. So the path is relative.
But the error message says nopassphrase.ppk, not keys/nopassphrase.ppk - And can you try a full path anyway? Just for a test.

But it would be a surprise if this would be the problem because if I use pageant as I mentioned the connection succeeds without modifying the path.
That's irrelevant.

Reply with quote

moeck
Joined:
Posts:
3

hi martin,
i tried the full path today and it worked by surprise.
I must admit that i quoted the error message not properly. It correctly said "unable to use key file 'Keys/nopassphrase.ppk' (unable to open file).
So i edited the code to put together the full path by using application path and the initial relative path.

Thx for the help :)

Reply with quote

Advertisement

You can post new topics in this forum