Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the '10.5: Use public keys with SSH in 10.5' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.5: Use public keys with SSH in 10.5
Authored by: cryptlib on Sat, Apr 25 2009 at 10:07PM PDT
If you have yr umask correctly set, the chmod issue isn't an issue. I use tcsh with backslash_quote on, and here's the alias that's served me quite well:

% alias skeyto
cat $HOME/.ssh/id_dsa.pub | ssh !* 'perl -e \'mkdir("$ENV{HOME}/.ssh");open(A,">>$ENV{HOME}/.ssh/authorized_keys");print(A <>)\' '

Of course, you need Perl in yr path, but who doesn't have that nowadays?

---
% kill -H -1

[ Reply to This | # ]
10.5: Use public keys with SSH in 10.5
Authored by: cryptlib on Sat, Apr 25 2009 at 10:14PM PDT
Here's the line in my rc file, with all the nasty backslashes and quotes:
alias skeyto 'cat $HOME/.ssh/id_dsa.pub | ssh \!* \'perl -e \\\'mkdir("$ENV{HOME}/.ssh");open(A,">>$
ENV{HOME}/.ssh/authorized_keys");print(A <>)\\\' \''

---
% kill -H -1

[ Reply to This | # ]