cygport SSH_KEY variable

Ken Brown kbrown@cornell.edu
Sat Jun 27 19:57:00 GMT 2015


On 6/27/2015 3:18 PM, Andrew Schulman wrote:
>> According to the documentation of SSH_KEY, "You'll need to set this if
>> your private key isn't already loaded into a running ssh-agent(1), and
>> it doesn't have one of the expected file names such as ~/.ssh/id_rsa."
>> But I don't see in the source that cygport checks for one of the
>> expected file names.  Is this a cygport bug or just a documentation bug?
>
> Neither, unless I'm mistaken.  cygport doesn't explicitly check for the standard
> key file names, it's true.  Instead, it relies implicitly on ssh to do that work
> for it.  cygport calls lftp, which calls sftp, which calls ssh, which then uses
> its standard logic of looking for keys in the expected locations, in a running
> ssh-agent, or according to an IdentityFile setting in ~/.ssh/config.
>
> When I was developing the cygport upload command, I considered reimplementing
> ssh's logic of looking for keys.  But with all of the above possiblities, it
> would've been way too hard.  So after some discussion on this list, I fell back
> on allowing the user specify SSH_KEY, and loading that key into an ssh-agent.
>
> So a more accurate statement would be:
>
>    You'll need to set this if your private key isn't in a place where sftp/ssh
>    can find it: one of the expected file names, such as ~/.ssh/id_rsa; loaded
>    into a running ssh-agent(1); or specified in IdentityFile in ~/.ssh/config.
>    See ssh(1), ssh_config(1), and ssh-agent(1) for details.
>
> which I guess would be worth the extra space.
>
> If you have an ssh key in a standard location, not loaded into an ssh-agent, and
> you don't set SSH_KEY, please do test that cygport is able to use that key to
> upload.  If not, it's a bug.

My mistake.  I do get a "Password" prompt, which confused me because I'm 
used to being prompted for a "passphrase" rather than a "password" when 
I use public key authentication.  I just now tried entering my 
passphrase at the prompt, and it works.

Thanks for the explanation.

Ken

Ken



More information about the Cygwin-apps mailing list