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.

28 lines
497 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 ! grep '^Host 0k-ro' "$SSH_CONFIG_DIR"/config >/dev/null 2>&1; then
  10. cat <<EOF >> "$SSH_CONFIG_DIR"/config
  11. Host 0k-ro
  12. Hostname git.0k.io
  13. Port 10022
  14. User lxc-user
  15. IdentityFile /etc/ssh/lxc_git_access_id_rsa
  16. UserKnownHostsFile /dev/null
  17. StrictHostKeyChecking no
  18. EOF
  19. fi