sftp access via tunnel server by privatekey and passphrase

Advertisement

hiro@jp
Guest

sftp access via tunnel server by privatekey and passphrase

Hi,

I am trying to make C# program which accesses some server thru tunnel server. Both servers are authenticated by priv key / passphrase. But to tunnel server, I cannot give any passphrase string by rawsetting "TunnelPasswordPlain=". I guess winscp.net may not have any way to give plain passphrase string to tunnel server authentication.

So, could you consider any of next ideas ?

1. To release some way of giving passphrase string to tunnel server like "TunnelPassphrasePlain=" or so.
2. Some interaction by passphrase entering dialog , or so.

I do not want to use pageant.exe.

I am very happy if you consider above. Thanks.

...Please forgive me if my english is broken. Any question is welcome. Regards.

Reply with quote

Advertisement

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

Re: sftp access via tunnel server by privatekey and passphrase

You can use an unencrypted private key.
As you hardcode the passphrase anyway, there's no big difference, particularly if you limit access permissions to the private key file.

Reply with quote

hiro@jp
Guest

Re: sftp access via tunnel server by privatekey and passphrase

You mean I can use the "rawsettings=" way ?

Could you tell me the detail ?

For example,

SessionOption.AddRawSettings("TunnelPasswordPlain", "unencrypedPassPhrase");

Is this correct ?

Reply with quote

martin
Site Admin
martin avatar

Re: sftp access via tunnel server by privatekey and passphrase

hiro@jp wrote:

You mean I can use the "rawsettings=" way ?
I mean to save the private key without passphrase.

Reply with quote

Hiro.A
Joined:
Posts:
20
Location:
Japan

Re: sftp access via tunnel server by privatekey and passphrase

Oh, I understood, but unfortunately I must use the private keyfile with passphrase for security reason.

I guess you do not want to offer the way to save any passphrase string , if so , can you offer us some interaction such as passphrase input dialog ?

Regards,

Reply with quote

Advertisement

Hiro.A
Joined:
Posts:
20
Location:
Japan

Re: sftp access via tunnel server by privatekey and passphrase

martin wrote:

What "security reason"? That's pretty vague.

Because my account was gave to me from my organization with priv key, so I cannot control my private key file. I cannot use sftp with any other private keys. (ex. no passphrase key)

This is my 'security reason'.

Can you make sense ?

Reply with quote

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

Re: sftp access via tunnel server by privatekey and passphrase

Hiro.A wrote:

Because my account was gave to me from my organization with priv key, so I cannot control my private key file. I cannot use sftp with any other private keys. (ex. no passphrase key)

This is my 'security reason'.

Can you make sense ?
But the private key is encrypted locally only! You can remove the protection from your copy of the private key. Just load it into PuTTYgen, and remove the passphrase and save it again. Of course, you need to take a reasonable care to protect the unencrypted private key.
https://winscp.net/eng/docs/faq_passphrase#unprotected

Reply with quote

Advertisement

You can post new topics in this forum