Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nicktastic

macrumors newbie
Original poster
Jun 3, 2009
1
0
Why hello,

My website was recently hacked and all indicators point to an FTP breach. As a response, I am switching to SFTP and completely disabling FTP access on my server.

I recently downloaded Cyberduck for my MAC due to it's SFTP capabilities. The Cyberduck forums are down, or I would pursue my question there. To set up an SFTP connection to my server, I followed the help guide given here. The details of which are as described below:
  1. Download/Install Cyberduck
  2. Open my MAC Terminal
  3. Run command ssh-keygen which generates a private key id_rsa and public key id_rsa.pub
  4. Upload id_rsa.pub to my server directory ~/.ssh/authorized_keys
  5. In Cyberduck, open a SFTP connection and select 'Use Public Key Authentication'
Everything seems extremely straightforward. When I try to connect, however, Cyberduck times out and will not connect. Am I missing something?

I appreciate your time and your help so much! :)

Thanks,
Nick
 

acovrig

macrumors newbie
Jun 27, 2010
2
0
Cannot connect either

I have the same problem (I think), if I execute ssh user@server in the terminal, it works just fine because I did ssh-keygen -t rsa, appended the contents of ~/.ssh/id_rsa.pub on the client with Cyberduck to ~/.ssh/authorized_keys on the server, but in Cyberduck, when I pick my public key (id_rsa.pub) it says "Invalid PEM structure, '-----BEGIN...' missing.". That got me curious :D because ---BEGIN... is in the private key, so I tried it and it worked, so instead of picking ~/.ssh/id_rsa.pub (or ~/.ssh/id_dsa.pub), pick ~/.ssh/id_rsa (or ~./ssh/id_dsa.pub) and it should work. ('~' is equivalent to '/Users/<username>/', it is your home directory)
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Have you tried connecting without using the keys? I usually just put in the address and it will create the keys automatically as needed.
 

JonB3Z

macrumors 6502
Jun 23, 2009
259
0
Can you connect using ssh via the command line? The symptom you are reporting sounds like the remote host (your Web server) is not responding to attempts to connect on the SSH port (port 22). If you can log in via:

ssh hostname

then the problem must be in Cyberduck. If you can't log in that way, the problem lies elsewhere, probably on the Web server itself, or in an intervening firewall/router.
 

meagain

macrumors 68030
Nov 18, 2006
2,570
26
I can't connect either. I just loaded up the new version. Could that be it - I wonder.

EDIT - I didn't have SSH installed LOL This isn't the first time I did this Ooops (ignore me)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.