File: setup_archive.sh

package info (click to toggle)
uhub 0.4.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,436 kB
  • ctags: 2,270
  • sloc: ansic: 18,123; xml: 575; perl: 568; sh: 368; makefile: 24
file content (26 lines) | stat: -rwxr-xr-x 479 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

PUB="${HOME}/.ssh/id_rsa.pub"
CFG="${HOME}/.ssh/config"

if [ ! "`grep build-archive ${CFG}`" ]; then
echo "Updating ssh config (${CFG})..."
cat >> ${CFG} <<EOF

Host build-archive
	ForwardX11	no
	HostName	login.domeneshop.no
	User		extatic
EOF
else
echo "ssh config seems OK (${CFG})"
fi

if [ ! -f ${PUB} ]; then
	echo "No id_rsa.pub - run ssh-keygen"
	exit 1
fi

echo "Copying public key (${PUB})..."
cat ${PUB} | ssh build-archive "cat >> .ssh/authorized_keys"