Change ssh port from 22 to 3030

This commit is contained in:
linuswck 2024-12-18 12:19:48 +08:00
parent a87a0a224f
commit 67cba47a3f
3 changed files with 43 additions and 5 deletions

View File

@ -0,0 +1,31 @@
diff --git a/linien_client/deploy.py b/linien_client/deploy.py
index df6683f..7355cc3 100644
--- a/linien_client/deploy.py
+++ b/linien_client/deploy.py
@@ -34,7 +34,7 @@ logger.setLevel(logging.DEBUG)
def read_remote_version(
- device: Device, ssh_port: int = 22, out_stream=sys.stdout
+ device: Device, ssh_port: int = 3030, out_stream=sys.stdout
) -> str:
"""Read the remote version of linien."""
@@ -62,7 +62,7 @@ def read_remote_version(
def start_remote_server(
- device: Device, ssh_port: int = 22, out_stream=sys.stdout
+ device: Device, ssh_port: int = 3030, out_stream=sys.stdout
) -> None:
"""Start the remote linien server."""
@@ -102,7 +102,7 @@ def start_remote_server(
def install_remote_server(
- device: Device, ssh_port: int = 22, out_stream=sys.stdout
+ device: Device, ssh_port: int = 3030, out_stream=sys.stdout
) -> None:
"""Install the remote linien server."""

View File

@ -173,6 +173,10 @@
nativeBuildInputs = [ pkgs.python3Packages.setuptools ];
patches = [
./fast-servo/linien-client-ssh-port-change.patch
];
doInstallCheck = false;
doCheck = false;
propagatedBuildInputs = with pkgs.python3Packages; [
@ -579,9 +583,8 @@
name = "nix-servo-dev_shell";
buildInputs = with pkgs.python3Packages; [
linien-common
linien-client
matplotlib
] ++ [ linien-gui ];
] ++ [ linien-client linien-gui ];
};
packages.x86_64-linux = {

View File

@ -28,11 +28,15 @@ index 010c487..2d08009 100644
};
}
diff --git a/runit.nix b/runit.nix
index d7b0bf3..67cff43 100644
index d7b0bf3..14dd437 100644
--- a/runit.nix
+++ b/runit.nix
@@ -7,8 +7,8 @@ let
Port 22
@@ -4,11 +4,11 @@ let
sshd_config = pkgs.writeText "sshd_config" ''
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
- Port 22
+ Port 3030
PidFile /run/sshd.pid
Protocol 2
- PermitRootLogin yes