From b4fd0ab74bd10f47cfee3b5eb22a1cca12e51394 Mon Sep 17 00:00:00 2001 From: e-carlin Date: Mon, 1 Apr 2024 16:16:47 +0000 Subject: [PATCH] Fix #474: allow vagrant localhost ssh in vm_devbox Allow ssh connections from vagrant over localhost in vm_devbox. This allows services like sirepo.job_driver.sbatch to connect over localhost back in to the host via ssh to start a job_agent. --- rsconf/package_data/vm_devbox/start.sh.jinja | 5 +++++ .../1.out/srv/host/v9.radia.run/srv/vm_devbox_user-1/start | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/rsconf/package_data/vm_devbox/start.sh.jinja b/rsconf/package_data/vm_devbox/start.sh.jinja index 3b2677e7..59dead2a 100644 --- a/rsconf/package_data/vm_devbox/start.sh.jinja +++ b/rsconf/package_data/vm_devbox/start.sh.jinja @@ -79,6 +79,11 @@ PasswordAuthentication no PermitRootLogin no Protocol 2 X11Forwarding yes + +# SSH acces from localhost (ex for sirepo.job_driver.sbatch) +ListenAddress 127.0.0.1:22 +Match User vagrant Address 127.0.0.1 + PasswordAuthentication yes EOF_INSTALL echo '{{ this.ssh_identity_pub_key }}' >> '/home/{{ this.run_u }}/.ssh/authorized_keys' diff --git a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/vm_devbox_user-1/start b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/vm_devbox_user-1/start index 77fbf8f4..ce28a0da 100644 --- a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/vm_devbox_user-1/start +++ b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/vm_devbox_user-1/start @@ -79,6 +79,11 @@ PasswordAuthentication no PermitRootLogin no Protocol 2 X11Forwarding yes + +# SSH acces from localhost (ex for sirepo.job_driver.sbatch) +ListenAddress 127.0.0.1:22 +Match User vagrant Address 127.0.0.1 + PasswordAuthentication yes EOF_INSTALL echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKe3wWXD3GUVd/5viGVhf6L/ttJJfmksXauPSpC8zWru v9.radia.run