From 512b5660e11268806c137e9f3b0e036c4a037885 Mon Sep 17 00:00:00 2001 From: Dan Hughes Date: Wed, 12 Feb 2020 07:14:13 +0000 Subject: [PATCH] Use user-defined hostname for SSH hostname (#1715) * Use user-defined hostname for SSH hostname * Update readme to use hostname in ssh commands --- README.md | 4 ++-- config.cfg | 2 +- server.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 263bf76..af9df90 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ You can now set up clients to connect to your VPN. Proceed to [Configure the VPN "# Local DNS resolver 172.16.0.1 #" "# The p12 and SSH keys password for new users is XXXXXXXX #" "# The CA key password is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #" - "# Shell access: ssh -F configs//ssh_config algo #" + "# Shell access: ssh -F configs//ssh_config #" ``` ## Configure the VPN Clients @@ -159,7 +159,7 @@ Use the example command below to start an SSH tunnel by replacing `` and ` Your Algo server is configured for key-only SSH access for administrative purposes. Open the Terminal app, `cd` into the `algo-master` directory where you originally downloaded Algo, and then use the command listed on the success message: - `ssh -F configs//ssh_config algo` +`ssh -F configs//ssh_config ` where `` is the IP address of your Algo server. If you find yourself regularly logging into the server then it will be useful to load your Algo ssh key automatically. Add the following snippet to the bottom of `~/.bash_profile` to add it to your shell environment permanently. diff --git a/config.cfg b/config.cfg index 7d3027e..6446398 100644 --- a/config.cfg +++ b/config.cfg @@ -146,7 +146,7 @@ congrats: ca_key_pass: | "# The CA key password is {{ CA_password|default(omit) }} #" ssh_access: | - "# Shell access: ssh -F configs/{{ ansible_ssh_host|default(omit) }}/ssh_config algo #" + "# Shell access: ssh -F configs/{{ ansible_ssh_host|default(omit) }}/ssh_config {{ algo_server_name }} #" SSH_keys: comment: algo@ssh diff --git a/server.yml b/server.yml index 99ffa37..54551eb 100644 --- a/server.yml +++ b/server.yml @@ -28,7 +28,7 @@ dest: "configs/{{ IP_subject_alt_name }}/ssh_config" mode: "0600" content: | - Host {{ IP_subject_alt_name }} algo + Host {{ IP_subject_alt_name }} {{ algo_server_name }} HostName {{ IP_subject_alt_name }} User {{ ansible_ssh_user }} Port {{ ansible_ssh_port }}