SSH Pubkey Setup In One Command
Transfer your ssh public key to a remote host, for passwordless logins, in one command:
ssh < "$key" "$@" ' cat > $HOME/authorized_keys && mkdir -p .ssh && cat $HOME/authorized_keys >> $HOME/.ssh/authorized_keys && rm -f $HOME/authorized_keys && chmod 0700 .ssh && chmod 0600 $HOME/.ssh/authorized_keys'
Note that newer versions of ssh now have
blog comments powered by Disqus