This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sshput <remotehost> | |
# | |
# Puts your local DSA public key into the .ssh/authorized_keys | |
# on a remote machine. This should allow you to login without | |
# needing a password. | |
# | |
# This software comes with no guarantees whatsoever, and is yours to | |
# do with as you will. I'd be grateful if you feed any generally-useful | |
# improvements back to me, for the benefit of others. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sshput () { | |
RSAKEY="${HOME}/.ssh/id_rsa.pub" | |
DSAKEY="${HOME}/.ssh/id_dsa.pub" | |
if [ $# -eq 2 ]; then | |
KEY=$1 | |
if [ ! -r $KEY ] | |
then | |
echo "'$KEY' does not exist or is not readable" | |
return 1 |