19 lines
494 B
Bash
19 lines
494 B
Bash
#!/usr/bin/env bash
|
|
# This script will register a new remote user for the lab workstation
|
|
# Copyright 2021 Bryan C. Roessler
|
|
|
|
[[ $# -eq 0 ]] && remote_host="hartmanlab.genetics.uab.edu"
|
|
|
|
[[ $# -eq 1 ]] && remote_host="$1"
|
|
|
|
[[ $# -gt 1 ]] && echo "Only one argument permitted" && exit 1
|
|
|
|
#remote_host="hartmanlab.genetics.uab.edu"
|
|
|
|
# generate local key if not available
|
|
|
|
if [[ -x $(command -v ssh-copy-id) ]]; then
|
|
ask_ok "Copy public key to $remote_host?"
|
|
ssh-copy-id "$remote_host"
|
|
fi
|