public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v1 0/6] Enable users to set an alternate ssh port
Date: Thu,  2 Oct 2025 16:21:34 -0400	[thread overview]
Message-ID: <20251002202140.3596787-1-cel@kernel.org> (raw)

From: Chuck Lever <chuck.lever@oracle.com>

Particularly in the cloud, provisioning publicly visible instances
with port 22 for ssh is bad security practice. Almost as soon as
kdevops brings up such an instance, it comes under attack on port
22.

So, my thought is to enable the use of an alternate port for Ansible
control. This series provides that flexibility; the default is still
to use port 22.

I've tested this with RHEL 9 on AWS, Azure, GCE, and OCI, and with
Debian 12 on AWS; and I tested with Fedora and guestfs.

One of the side benefits of this series is that now all of the
cloud providers except Lambda make use of a cloud-init script. We
can introduce additional capabilities there, going forward.

Also pushed to the linux-kdevops/kdevops alternate-ssh-port branch.

Chuck Lever (6):
  ansible.cfg: Allow the use of alternate ssh ports
  base_image: Make the semanage command available on base images
  guestfs: Refactor the construction of the virt-sysprep command line
  guestfs: Use the alternate ssh port for Ansible control
  terraform: Hoist the AWS cloud-init script into terraform/
  terraform: Use the alternate ssh port for Ansible control

 kconfigs/Kconfig.ansible_cfg                  | 41 ++++++++
 playbooks/nixos.yml                           |  2 +-
 .../ansible_cfg/templates/ansible.cfg.j2      |  3 +
 .../base_image/templates/virt-builder.j2      |  2 +-
 .../templates/aws/terraform.tfvars.j2         |  1 +
 .../templates/azure/terraform.tfvars.j2       |  1 +
 .../templates/gce/terraform.tfvars.j2         |  1 +
 .../templates/lambdalabs/terraform.tfvars.j2  |  1 +
 .../templates/oci/terraform.tfvars.j2         |  1 +
 .../templates/openstack/terraform.tfvars.j2   |  1 +
 .../roles/guestfs/tasks/bringup/main.yml      | 44 +++++----
 .../roles/terraform/templates/ssh_config.j2   |  2 +-
 scripts/update_ssh_config_guestfs.py          |  3 +-
 scripts/update_ssh_config_lambdalabs.py       | 18 +++-
 terraform/aws/main.tf                         |  7 +-
 terraform/aws/templates/script.sh             | 55 -----------
 terraform/azure/main.tf                       |  9 +-
 terraform/gce/main.tf                         | 23 ++++-
 terraform/lambdalabs/main.tf                  | 43 +++++++-
 terraform/oci/main.tf                         | 11 ++-
 terraform/openstack/main.tf                   | 11 ++-
 terraform/scripts/cloud-init.sh               | 97 +++++++++++++++++++
 terraform/shared.tf                           |  6 ++
 23 files changed, 289 insertions(+), 94 deletions(-)
 delete mode 100755 terraform/aws/templates/script.sh
 create mode 100755 terraform/scripts/cloud-init.sh

-- 
2.51.0


             reply	other threads:[~2025-10-02 20:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 20:21 Chuck Lever [this message]
2025-10-02 20:21 ` [PATCH v1 1/6] ansible.cfg: Allow the use of alternate ssh ports Chuck Lever
2025-10-02 20:21 ` [PATCH v1 2/6] base_image: Make the semanage command available on base images Chuck Lever
2025-10-02 20:21 ` [PATCH v1 3/6] guestfs: Refactor the construction of the virt-sysprep command line Chuck Lever
2025-10-02 20:21 ` [PATCH v1 4/6] guestfs: Use the alternate ssh port for Ansible control Chuck Lever
2025-10-02 20:21 ` [PATCH v1 5/6] terraform: Hoist the AWS cloud-init script into terraform/ Chuck Lever
2025-10-02 20:21 ` [PATCH v1 6/6] terraform: Use the alternate ssh port for Ansible control Chuck Lever
2025-10-02 20:25   ` Chuck Lever
2025-10-03  0:50 ` [PATCH v1 0/6] Enable users to set an alternate ssh port Luis Chamberlain
2025-10-03 13:44   ` Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251002202140.3596787-1-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox