Trouble with SFTP using public key in PuTTY format

Trouble with SFTP using public key in PuTTY format

1
NewbieNewbie
1

    Aug 02, 2004#1

    I just upgraded to UE 10.20b, because it claims PuTTY private key compatibility since version 10.20. I cannot get it to work, though.

    I set up a FP account, do not fill out the password field, tick the Secure checkbox and click on Advanced button. In the Advanced dialog I set transfer type to "binary" (shouldn't matter), Authentication to "Public key only" and provide correct path to the private key in the PuTTY format (key is not password protected). I can connect fine with PuTTY, so I know the key is accepted for authentication. Conversely - if I use password auth in UE - it works, too.

    I am getting "Invalid username or password reported by the server" when I attempt to "Browse Site", but there is no connection attempt in the system logs on the server site. Checked the firewall logs and nothing is being sent from the UE system when I use public key authentication.

    Any ideas?

    1
    NewbieNewbie
    1

      Oct 03, 2004#2

      I never tried UE with Putty keys myself, only with OpenSSH keys.

      Here are some ideas:

      1) First, make sure the connection works with Putty (be sure it's v0.55 with the latest security fixes).

      2) Make sure the SSH user name in Putty matches the Username in UltraEdit (this is, from top, the second left field in the connection dialog)

      3) Make sure the host name within Putty matches your hostname in UE (this is, from top, the first right field in the connection dialog)

      4) Enter the key Path (*.ppk) in the Extended Connection info and make sure it is saved.

      If this does not work, try this:

      a) Load the key in puttygen

      b) Export it as OpenSSH2 key. (There is a menu for this in the menu bar)

      c) Try this key with UE.

      If you still have problems, try to install Cygwin (http://www.cygwin.com). Create and test your key with the ssh port of Cygwin (ssh-keygen). With cygwin you can use option -v to see what SSH does. CygWin keys work for me.
      -Tino

      Hereby I vote for:
      UE's FTP/SFTP Load Dialog shouldn't be modal.
      Alternatively there should be some method to somehow "beam" the remote file information from WinSCP directly to UE.

      1
      NewbieNewbie
      1

        Jan 14, 2005#3

        A few more hints that might help others with SFTP problems...

        Error: Server refused our key

        Check that the public key is in the proper file in a subdirectory of the user's home directory. The subdirectory should be named .ssh (dot-s-s-h, this is a hidden directory). The filename should be authorized_keys2 (DSA keys) or authorized_keys (RSA keys).

        Code: Select all

        [carsonm@mds ~]$ cd .ssh
        [carsonm@mds .ssh]$ pwd
        /home/carsonm/.ssh
        [carsonm@mds .ssh]$ ls -l
        total 20
        -rw-------  1 carsonm carsonm 1893 Jan  2 14:42 authorized_keys2
        -rw-------  1 carsonm carsonm  744 Dec 31 00:57 carsonm_id
        -rw-r--r--  1 carsonm carsonm  631 Dec 31 00:57 carsonm_id.pub
        -rw-------  1 carsonm carsonm  736 Dec 31 00:04 id_dsa
        -rw-r--r--  1 carsonm carsonm  631 Dec 31 00:04 id_dsa.pub
        [carsonm@mds .ssh]$
        
        The authorized_keys2 file seems to be sensitive to permissions and ownership. Try setting the permissions to 600 (r/w for owner, no access for anyone else).

        Code: Select all

        chmod 600 authorized_keys2
        If the above does not work, try setting the owner of the file to root. Caution: if you do both of these things and you are not the admin on the box, you will probably be stuck with a file you can't change and can't delete. Try the chmod command first.

        Code: Select all

        chown root:root authorized_keys2
        Error: Error Connecting

        In PuTTY, the error text may be "Network Connection Refused" or similar.

        This error turned out to be caused by a software firewall. In my case, it was the Norton firewall, but similar things might happen with ZoneAlarm or the XP firewall. Disable the firewall temporarily to check.

        Finally, hats off to IDM for including SFTP into UltraEdit. I upgraded to the latest version just for this feature. You'll be getting my upgrade fee real soon...at least in the next 30 days when the trial period runs out!