This file contains hidden or 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/bash | |
######################################################################################## | |
## ssh-copy-id-if-needed | |
## | |
## Copies specified identity file to specified server | |
## | |
usage() { | |
echo "usage: $0 [-i [identity_file]] [user@]machine" >&2 | |
exit 1 |
This file contains hidden or 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 | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
This file contains hidden or 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/bash | |
# Print the serial number of your disks with this script | |
ls /dev/disk/by-id/ata* | sed -e '/-part[0-9]*$/d;s/.*_//' | while read SERIAL; | |
do | |
DEVICE=$(readlink -f /dev/disk/by-id/ata*${SERIAL}); | |
echo ${DEVICE}" "${SERIAL}; | |
done | sort; |
NewerOlder