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.

33 lines
657 B

  1. #!/bin/bash
  2. ##
  3. ## ssh config
  4. ##
  5. cp src/etc/ssh/lxc_git_access_id_rsa /etc/ssh/lxc_git_access_id_rsa
  6. chmod 0600 /etc/ssh/lxc_git_access_id_rsa
  7. SSH_CONFIG_DIR=~/.ssh
  8. mkdir -p "$SSH_CONFIG_DIR"
  9. if ! [ -e "$SSH_CONFIG_DIR/config.pre-install" ]; then
  10. cp "$SSH_CONFIG_DIR/config" "$SSH_CONFIG_DIR/config.pre-install"
  11. else
  12. cp "$SSH_CONFIG_DIR/config.pre-install" "$SSH_CONFIG_DIR/config"
  13. fi
  14. cat <<EOF >> "$SSH_CONFIG_DIR"/config
  15. Host 0k-ro
  16. Hostname git.0k.io
  17. Port 10022
  18. User lxc-user
  19. IdentityFile /etc/ssh/lxc_git_access_id_rsa
  20. PubkeyAcceptedKeyTypes +ssh-rsa
  21. UserKnownHostsFile /dev/null
  22. StrictHostKeyChecking no
  23. EOF