forked from 0k/0k-charms
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
621 B
32 lines
621 B
#!/bin/bash
|
|
|
|
|
|
##
|
|
## ssh config
|
|
##
|
|
|
|
cp src/etc/ssh/lxc_git_access_id_rsa /etc/ssh/lxc_git_access_id_rsa
|
|
chmod 0600 /etc/ssh/lxc_git_access_id_rsa
|
|
|
|
SSH_CONFIG_DIR=~/.ssh
|
|
|
|
mkdir -p "$SSH_CONFIG_DIR"
|
|
|
|
if ! [ -e "$SSH_CONFIG_DIR/config.pre-install" ]; then
|
|
cp "$SSH_CONFIG_DIR/config" "$SSH_CONFIG_DIR/config.pre-install"
|
|
else
|
|
cp "$SSH_CONFIG_DIR/config.pre-install" "$SSH_CONFIG_DIR/config"
|
|
fi
|
|
|
|
|
|
cat <<EOF >> "$SSH_CONFIG_DIR"/config
|
|
|
|
Host 0k-ro
|
|
Hostname git.0k.io
|
|
Port 10022
|
|
User lxc-user
|
|
IdentityFile /etc/ssh/lxc_git_access_id_rsa
|
|
UserKnownHostsFile /dev/null
|
|
StrictHostKeyChecking no
|
|
|
|
EOF
|