Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 whoever 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 Apr 25, '09 10:07:51PM

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 Apr 25, '09 10:14:15PM
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 | # ]