Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B82E7261D for ; Fri, 3 Oct 2025 13:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759499059; cv=none; b=RlbKSY1/WF3IgyR13qD7Jgjdy7+0XMD7cRQyhE50Ro+GrJUlKJOublegmQ+HHsP5xd6y4XhThS6Nyo8ZwJDl9N8l4bB8y8ZzmFd+rqHbMiYbL+AiOhpVBZr2ZfI6KrHoZUSGsoLtff6mdlwiaSik82h2Ekkcsqh5Ompx4Mdo/58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759499059; c=relaxed/simple; bh=3CYYiPn2w9jF/Gver8cq41tNRRLOx1APirp3W7w0SHU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LtuuXCVUEzfAu+QpdqewADyPprrs9mzOEdTHSbw4RrIgZHymv98SQgn9BWCAPxQgk7Do8p0JLn4YwWGmIzHuiuuXMg+h6rZ8dfHaIHnfbEg1a80ZdAG7IItsceBdX9Tpw9yE9mmRYYp7czF1X8L7Fu86DZdYRJ4GYpacix9kTm0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LHCdCDSP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LHCdCDSP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 930BDC4CEF5; Fri, 3 Oct 2025 13:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759499057; bh=3CYYiPn2w9jF/Gver8cq41tNRRLOx1APirp3W7w0SHU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=LHCdCDSPiy5b5lj3XTfQnl6l5LI+mXdIORrEjKgOMcBhjzgiOitrMBFFKwWXtkyjF GLAMLWaTWX2ub9Bxk0YPHBU3N6E5Scd0RowHmSvVGE7TKYC38RvOY+KnXknddgfzWS Cq6qcDClapRez0Zr4DMt9EsfuLb0pc0WMvaG1QvqFoSb1xlQJRf+X9fd5TmK9l7Zen 2LFjccy24fDx4DnK/USNDZHUUQ4kUbg5aTmGvgLGHWx+YkydNqJcKtQ/Dnw+EAYdft 8V7fd+NoUa+edR0DPL1QO3awRaS8Xz8q13P7m1TXlSlg13oymuosFf8wykCKhyY52y B+CCS53oF1YNw== Message-ID: <9c7858c1-f85b-413f-9ec0-c62e22f284a9@kernel.org> Date: Fri, 3 Oct 2025 09:44:16 -0400 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 0/6] Enable users to set an alternate ssh port To: Luis Chamberlain Cc: kdevops@lists.linux.dev, Chuck Lever References: <20251002202140.3596787-1-cel@kernel.org> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/2/25 8:50 PM, Luis Chamberlain wrote: > On Thu, Oct 02, 2025 at 04:21:34PM -0400, Chuck Lever wrote: >> From: Chuck Lever >> >> 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. > > This is awesome security best practice, thanks! For cloud providers > which support it, why don't we just make it a default? My impression is that they all support it, but I haven't tested OpenStack or Lambda Labs because I don't have tenancies for those providers/stacks (also haven't tested Nixos). Let me think about how to deal with the OCI "use an existing VCN" setting, where the existing VCN likely has a security rule specific to port 22. I can merge this series as is then follow up with one or two patches to change the default ssh port when I figure that out. -- Chuck Lever