summaryrefslogtreecommitdiff
path: root/default/steps/bootstrap/prepare_ssh_to_out_context.yaml
blob: 172f7a42938f31260f48a4d4f9b77d57e1a0680b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- select_empty_port:
  - on_checkpoint: redo
  - exec_local: |
      # Find empty SSH forwarding port
      SSH_FWD_PORT=$(__find_free_port 50000 60000)
      echo "SSH forwarding port: $SSH_FWD_PORT"
- prepare_ssh_config:
  - on_checkpoint: redo
  - write_local:
    - $${ssh_config_file}
    - |
      Host $${kameleon_recipe_name}
      HostName 127.0.0.1
      Port ${SSH_FWD_PORT}
      User root
      UserKnownHostsFile /dev/null
      StrictHostKeyChecking no
      PasswordAuthentication no
      IdentitiesOnly yes
      LogLevel FATAL
      ForwardAgent yes
      Compression yes
      Protocol 2