A place where the Joyent community can gather, help each other out, and stay informed.
You are not logged in.
This is written from a Mac OS X users perspective. It applies to other unix types too!
1) open a terminal window.
2) type 'ssh-keygen -d'
3) if you haven't enabled ssh yet, all you need to do is copy ~/.ssh/id_dsa.pub to your ftp server /home/username/.ssh/authorized_keys. If you already have an authorized keys file, take direction from the following: http://www.cactusdata.co.uk/~bkeitch/howto/backup.html
4) to sync your directories use this command...
rsync -a "username@one.textdrive.com:/home/username/public_html" /path/to/local/backupdir/ --times --links --recursive --hard-links -e ssh --progress --delete
5) If it doesn't work, you messed something up, look over here: http://www.cactusdata.co.uk/~bkeitch/howto/backup.html That is how I figured this all out!
Comments, suggestions?
Last edited by noel (2004-09-10 17:53:15)
Offline
nope, shell access is not needed. and yes, please put it in the knowledge base!
Offline
noel wrote:
This is written from a Mac OS X users perspective. It applies to other unix types too!
1) open a terminal window.
2) type 'ssh-keygen -d'
3) if you haven't enabled ssh yet, all you need to do is copy ~/.ssh/id_dsa.pub to your ftp server /home/username/.ssh/authorized keys. If you already have an authorized keys file, take direction from the following: http://www.cactusdata.co.uk/~bkeitch/howto/backup.html
4) to sync your directories use this command...rsync -a "username@one.textdrive.com:/home/username/public_html" /path/to/local/backupdir/ --times --links --recursive --hard-links -e ssh --progress --delete
5) If it doesn't work, you messed something up, look over here: http://www.cactusdata.co.uk/~bkeitch/howto/backup.html That is how I figured this all out!
Comments, suggestions?
"/home/username/.ssh/authorized keys" above refers to a file called "authorized_keys" ( note underscore ) into which you will have copied your id_dsa.pub file contents.
Last edited by robertbrook (2004-09-05 21:17:56)
Offline
I'm trying this right now, but there doesn't seem to be a .ssh directory. Is that normal?
Offline
But there should be one on the server, right? I have a .ssh directory on my Mac, just not on the server. Or am I reading/understanding the instructions wrong?
Offline
Brad Smith wrote:
But there should be one on the server, right? I have a .ssh directory on my Mac, just not on the server. Or am I reading/understanding the instructions wrong?
It seems that the folder is there, just invisible. You have to directly key in its location. Having said that, I'm having a lot of trouble following the knowledgebase article. If you follow it word for word, it just doesn't work. There are steps missing and too many assumptions made. Has anyone got it working on a Mac and would care to share how they did so? Or make amendments to the kb? So many tutorials on this on the internet have completely different flags for the initial keygen command.
Offline
The ~/.ssh folder (which is /Users/username/.ssh on Mac OS X) may or may not be already created, depending on whether you've used SSH before or not. Folders that are prefixed with a dot are normally hidden in the Finder as normally you don't frequently access them and they would otherwise clutter up your Finder windows (also, they're used for config stuff, and you don't want to mess around with that if you don't know what you're doing).
As for the ssh-keygen flags, the only thing you really have to specify is the type of key you want to use (DSA etc). This is done with the -t flag:
$ ssh-keygen -t dsa
As near as I can tell, the -d that is mentioned up above and in kb.textdrive.com is the same as '-t dsa'.
If there's any other problem you're having, feel free to post with details on which bit in particular is causing a stumbling block. Hope this helps.
Offline
Thanks, Andy. I might just take you up on that. Firstly, though, here:
dance wrote:
It seems that the folder is there, just invisible.
I was (hopefully!) answering a question about the ssh folder on the remote, not Mac OS X, server.
kb wrote:
1. Open a terminal window
2. Type ssh-keygen -d to generate your ssh keys
3. Copy the contents of your public key ~/.ssh/id_dsa.pub in you local directory to the file /home/username/.ssh/authorized_keys on your TextDrive account.
This is the troublesome section of the kb - it just doesn't follow on! For example,
2. keygen asks me what to save the file as after step 2 and I'm not told what to call it. In addition any files generated end up in ~/ and not ~/.ssh/
3. copy the contents of id_dsa.pub to a file or copy the file to a folder?
Thanks!
Last edited by dance (2006-03-02 03:17:30)
Offline
Sure, no problem. It doesn't matter where you create your keys using ssh-keygen, as you can move them right after they've been created. ssh-keygen creates two files, id_dsa and id_dsa.pub. You want both of these to be in ~/.ssh (so just move them afterwards if they're in ~/)
$ mv ~/id_dsa* ~/.ssh/
This is on your local machine (which, I believe, is Mac OS X). Next, the ~/.ssh directory on the server needs to contain a file called authorized_keys. This should just contain a line with your public key in it -- if you're only using one key then you can just upload id_dsa.pub and rename it to ~/.ssh/authorized_keys on the remote server.
Offline
Andy you're a hero. You succinctly yet comprehensively solved my problem. The problem was that my private key wasn't stored in my Mac's ssh repository so even though my public key was correctly configured on the server, things weren't working out.
I find that to login without a password I must type ssh username@hostname.tld and not just ssh hostname.tld. If I attempt the latter I'm still prompted for a password.
This is excellent. Thank you.
Offline
dance wrote:
I find that to login without a password I must type ssh username@hostname.tld and not just ssh hostname.tld. If I attempt the latter I'm still prompted for a password.
That happens because you are using a different username on the server than on your Mac.
Offline
I don't seem able to find the Knowledge Base article referred to. Can anyone point me to it. And given that this thread was started a while ago, are there any updates?
Thanks
Offline