home · contact · privacy
Update Firefox.
[config] / all_new_2018 / setup_scripts / prepare_to_meet_server.sh
1 #!/bin/sh
2 # Do some of the steps necessary to SSH (key-based) with another server.
3 set -e
4
5 target="$1"
6
7 # We need a public key to copy over, so generate it if not found.
8 if [ ! -f ~/.ssh/id_rsa.pub ]; then
9     ssh-keygen
10 fi
11
12 # Add target to ~/.ssh/known_hosts so we don't get
13 # asked for permission at inopportune moments.
14 ssh-keyscan -H "$target" >> ~/.ssh/known_hosts
15
16 # Tell user what to do.
17 echo "APPEND FOLLOWING TO TARGET'S ~/.ssh/authorized_keys:"
18 cat ~/.ssh/id_rsa.pub