Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to securely control another Mac over the internet' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to securely control another Mac over the internet
Authored by: MattHaffner on May 10, '05 03:38:00PM

If the file doesn't exist already, create it. From the dummy account for this tip,

cp ~dad/.ssh/id_dsa.pub ~/.ssh/authorized_keys

(I think the '2' is a vestige of an older version of OpenSSH when the v1 and v2 protocols were more separated).

More generally, you can use 'scp' to copy a remote id_dsa.pub from an account you have access to into an authorized_keys file "locally". You can also use any other file transfer to grab the id_dsa.pub--there's nothing magic about the scp transfer.

You should also do this, if the file doesn't exist:

chmod 600 ~/.ssh/authorized_keys

Since ssh might not use the file if it's not secured well enough.

For future reference, the ~/.ssh/authorized_keys file can have multiple keys in it to allow (non-password) remote logins from multiple users. If you ever want that functionality, get used to using this syntax instead:

cat ~dad/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

which appends the first file to the end of the second.

As for mapping your ssh traffic to a specific machine, you have to check the details on your router, but this is easiest if you assign a static LAN IP to the machine first. Then you should have an option in the router to "map ports" or "port translation" that should allow you to fill in (at least) three numbers: the port the remote machine is requesting to access, the port you want it to go to on your local machine, and the LAN IP of the local machine. With a standard setup, the first two numbers are both 22 for ssh. Don't forget to open up the service on your Mac as well in the Sharing pref pane.



[ Reply to This | # ]
How to securely control another Mac over the internet
Authored by: bryan3605 on May 13, '05 12:51:41AM

I've got the "dads" public key in my "powerbook" in the corect position and I've turned on port forwarding for port 22 on my router to my "powerbook's" IP, but I'm not sure where the Private key needs to go on the "dads" system. It is currently in the top level of the "dads" user account. Do I need to create a /.ssh directory to place this file in?

When I double click on the teminal icon on the "dad" computer, I get a message saying "connection refused."



[ Reply to This | # ]
How to securely control another Mac over the internet
Authored by: beaster on May 14, '05 11:36:26AM

Yes, the "dad's" private key should go in /Users/dads_username/.ssh/ on "dad's" computer. Permissions should be 600 on the directory.

Regards,
Sean



[ Reply to This | # ]
How to move the public key?
Authored by: sharkbite86 on Oct 21, '05 11:43:09AM

I dont understand the process of moving the key file. Now im pretty sure I am supposed to use Terminal but how do I move the public key from "Dads" computer to mine over a ethernet connection (or any connection for that matter)? I dont use Termial that much so i would be really happy if someone could fill me in. Thanks.



[ Reply to This | # ]