0

i have been wrecking my head around this for hours but so far have been unsuccessful:

one a mac, i can do the following:

  • connect to my server via ssh
  • enter private-key passphrase
  • passphrase is stored in keychain
  • lftp now automatically uses the stored passphrase

on windows, cygwin does not store the passphrase, and lftp does not prompt me for it. so when i enter

lftp -p PORT -e "set ssl:key-file file" -u user,xxx sftp://IP

and do 'ls', i immediately get disconnected. any idea how i can pass along the passphrase/make lftp ask me for it?

thanks :)

(this might work with putty, but i want to use cygwin only)

got it. installing and setting up ssh-agent did the trick. more info here

1 Answer 1

0

In Cygwin there is a bit of a problem with setting up the HOME directory, which is the really unexpected part of it. I do not know whether you have done this properly, but basically, once you have doe that, the configuration is identical to that of the *Nix systems (unsurprising, given that Cygwin too uses OpenSSH, the de facto standard in the *Nix world).

I can give you a useful reference here, and a quote from the very same Web page:

Creating the home directory with Cygwin: The Cygwin installation folder contains folders "usr" and "bin". If there is not one already, add a folder called "home" and in that folder add a folder with some name, typically your user name, e.g., "nifty". This will be the folder where ssh.exe will look for the .ssh folder containing your keys; see below. (Cygwin thinks your home is where the line in /etc/passwd says it is, see below). Note your home directory does not have to be in Cygwin's "/home" (mine is not), you can put it anywhere, e.g., C:\nifty. To do this, you will have to start a Cygwin console and run

  $ cd /
  $ mkdir home
  $ cd home
  $ ln -s /cygdrive/c/nifty nifty

The "ln" command is making a symbolic link, like a Windows shortcut, from Cygwin's /home/nifty to your C:\nifty. Note that "/cygdrive/c/nifty" is Cygwin's way of saying "C:\nifty". If your HOME is on another drive, say D:, use the cygwin prefix /cygdrive/d.

Setting the HOME environment variable on Windows: For Win2K/XP right click on "My Computer", click on "Advanced" and "Environment variables". Add a personal environment variable HOME with value, e.g., C:\cygwin\home\nifty (or if you did the ln business above, C:\nifty). You shouldn't need to reboot.

1
  • thanks for the answer. i do indeed have a working home directory, so that is not the problem. everything is working fine, except lftp refuses to prompt me for the passphrase...
    – foo
    Nov 14, 2013 at 9:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .