Topic "Automatically start Pageant"

Author Message
xmt

Guest


Hey,

Would it be possible to add an option that if WinSCP can't find Pageant running when "Attempt authentication using Pageant" is enabled, it will start it automatically?

This would be really handy for when I sometimes forget to load up Pageant. Currently one has to cancel the connection, and then reconnect once Pageant has been started.

There would need to be a way to specify the command to execute in order to start the agent, since the only way I've found to make Pageant "remember" keys is to pass them as arguments.

Currently the best solution to this I've come up with is to create two additional shortcuts to Pageant, of the form...
Code:
"C:\Program Files (x86)\WinSCP\PuTTY\pageant.exe" "C:\Users\xxx\Documents\key.ppk" -c "C:\Program Files (x86)\WinSCP\WinSCP.exe"

...one for WinSCP and one for PuTTY, and then the icon can be changed to make the shortcut look like the real deal.

Unfortunately this makes key management a bit of a faff, not to mention it means I now *have* to enter all my passphrases into Pageant even if I wasn't planning to log into a server which required a key.

Thanks for your time.

Ps. Not sure if I should be asking the PuTTY people about this instead, since I'd also really like PuTTY to do this too.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You can configure WinSCP to use the key directly, without using pageant. Wouldn't it be a solution?
_________________
Martin Prikryl
xmt

Guest


prikryl wrote:
You can configure WinSCP to use the key directly, without using pageant. Wouldn't it be a solution?

Wouldn't that mean I'd need to enter the passphrase every time I wanted to log in? One of the main benefits of using an agent is that I only have to do that once.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
xmt wrote:
Wouldn't that mean I'd need to enter the passphrase every time I wanted to log in? One of the main benefits of using an agent is that I only have to do that once.

That's true.

You can as well start both WinSCP and Pageant from one batch file.
_________________
Martin Prikryl
consistency
[View user's profile]

Joined: 2008-08-16
Posts: 51
Location: austria
would be great to have such a feature like in tortoisegit with putty. if i start a session where i need my key pageant is startet and prompts me for the passphrase. if i enter it, it is directly stored in pageant. no fiddeling around with batch files to start pageant and winscp with the key.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
consistency wrote:
would be great to have such a feature like in tortoisegit with putty. if i start a session where i need my key pageant is startet and prompts me for the passphrase. if i enter it, it is directly stored in pageant. no fiddeling around with batch files to start pageant and winscp with the key.

How does tortoisegit tell that key is needed for that session?
_________________
Martin Prikryl
consistency
[View user's profile]

Joined: 2008-08-16
Posts: 51
Location: austria
i don't know how it work exactly in tortoise git, would have to look into the source
but i think it is quite straight:
you have the path to the key saved in your winscp session, so if the session is started a call like "exec(pageant sessionKeyNameWithPath)" sould be enough.
if you exec pageant like this, it will spawn its own password dialog and will keep the key including password in memory until the system is restarted. i don't know how you invoke the key, but i think you invoke it internal in winscp, rather then just sending the path to pageant.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
consistency wrote:
i don't know how it work exactly in tortoise git, would have to look into the source
but i think it is quite straight:
you have the path to the key saved in your winscp session, so if the session is started a call like "exec(pageant sessionKeyNameWithPath)" sould be enough.
if you exec pageant like this, it will spawn its own password dialog and will keep the key including password in memory until the system is restarted. i don't know how you invoke the key, but i think you invoke it internal in winscp, rather then just sending the path to pageant.

OK, so you have to specify the key in the session. Because in general, you do not have to. WinSCP tries to use any key loaded into pageant.

This request has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=738
consistency
[View user's profile]

Joined: 2008-08-16
Posts: 51
Location: austria
prikryl wrote:

OK, so you have to specify the key in the session. Because in general, you do not have to. WinSCP tries to use any key loaded into pageant.

oh i see, i used to define my key in the "private key file" field of the winscp session. maybe you just can add the functionality with calling the pageant, if a key is specified in this field.
or add a checkbox force loading with pageant.

thanks for adding to the bug tracker
Petr
[View user's profile]
Moderator
Joined: 2006-01-26
Posts: 50
+1
consistency
[View user's profile]

Joined: 2008-08-16
Posts: 51
Location: austria
push

if you use a lot of different keys, it is really important having this feature.

currently, after a network disconnect (computer hibernation), i have to enter all passphrases for the keys again (on all winscp connections and all putty sessions (using reconnect)).

would be great having winscp let pageant load the key, so it stays in memory after hibernation.
twee

Guest


http://twee1.blogspot.com/2015/09/loading-and-automating-pageant-load.html
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License