From 9fc1ec391218ccd2f91c562f07906cde2e3b9072 Mon Sep 17 00:00:00 2001 From: Glenn Date: Thu, 2 Nov 2023 12:43:46 +0100 Subject: [PATCH] feat add support for configurable ssh port --- src/filesystems/sshfs.cr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/filesystems/sshfs.cr b/src/filesystems/sshfs.cr index 802639b..44ddab9 100644 --- a/src/filesystems/sshfs.cr +++ b/src/filesystems/sshfs.cr @@ -12,6 +12,7 @@ module GX getter remote_path : String = "" getter remote_user : String = "" getter remote_host : String = "" + getter remote_port : String = "22" @[YAML::Field(key: "mount_dir", ignore: true)] getter mount_dir : String = "" @@ -34,7 +35,11 @@ module GX error = STDERR process = Process.new( "sshfs", - ["#{remote_user}@#{remote_host}:#{remote_path}", mount_dir], + [ + "-p", remote_port, + "#{remote_user}@#{remote_host}:#{remote_path}", + mount_dir + ], input: input, output: output, error: error