From 28c5d5a6c5f873dc701b597276271763e7d1c004 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20W=C4=85sowski?= <michal@erlang.org>
Date: Mon, 20 Apr 2026 19:16:52 +0200
Subject: [PATCH 1/4] Fix root escape vulnerability in SSH_FXP_FSETSTAT

---
 lib/ssh/src/ssh_sftpd.erl        |  62 +++++++-------
 lib/ssh/test/ssh_sftpd_SUITE.erl | 138 ++++++++++++++++++++++++-------
 2 files changed, 139 insertions(+), 61 deletions(-)

Index: otp-OTP-27.1.3/lib/ssh/src/ssh_sftpd.erl
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/src/ssh_sftpd.erl
+++ otp-OTP-27.1.3/lib/ssh/src/ssh_sftpd.erl
@@ -61,8 +61,8 @@ Specifies a channel process to handle an
 	  max_path,                     % integer > 0 - max length of path
 	  options,			% from the subsystem declaration
 	  handles			% list of open handles
-	  %% handle is either {<int>, directory, {Path, unread|eof}} or
-	  %% {<int>, file, {Path, IoDevice}}
+	  %% handle is either {<int>, directory, {AbsPath, unread|eof}} or
+	  %% {<int>, file, {AbsPath, IoDevice}}
 	 }).
 
 %%====================================================================
@@ -364,7 +364,7 @@ handle_op(?SSH_FXP_OPENDIR, ReqId,
 				    "Not a directory"),
 	    State1;
 	true when HandlesCnt < MaxHandles ->
-	    add_handle(State1, XF, ReqId, directory, {RelPath,unread});
+	    add_handle(State1, XF, ReqId, directory, {AbsPath,unread});
         true ->
 	    ssh_xfer:xf_send_status(XF, ReqId, ?SSH_FX_FAILURE,
 				    "max_handles limit reached"),
@@ -375,11 +375,11 @@ handle_op(?SSH_FXP_READDIR, ReqId,
 	  State) ->
     XF = State#state.xf,
     case get_handle(State#state.handles, BinHandle) of
-	{_Handle, directory, {_RelPath, eof}} ->
+	{_Handle, directory, {_AbsPath, eof}} ->
 	    ssh_xfer:xf_send_status(XF, ReqId, ?SSH_FX_EOF),
 	    State;
-	{Handle, directory, {RelPath, Status}} ->
-	    read_dir(State, XF, ReqId, Handle, RelPath, Status);
+	{Handle, directory, {AbsPath, Status}} ->
+	    read_dir(State, XF, ReqId, Handle, AbsPath, Status);
 	_ ->
 	    ssh_xfer:xf_send_status(XF, ReqId, ?SSH_FX_INVALID_HANDLE),
 	    State
@@ -415,7 +415,7 @@ handle_op(?SSH_FXP_READ, ReqId, <<?UINT3
 				 ?UINT64(Offset), ?UINT32(Len)>>,
 	  State) ->
     case get_handle(State#state.handles, BinHandle) of
-	{_Handle, file, {_Path, IoDevice}} ->
+	{_Handle, file, {_AbsPath, IoDevice}} ->
 	    read_file(ReqId, IoDevice, Offset, Len, State);
 	_ ->
 	    ssh_xfer:xf_send_status(State#state.xf, ReqId, 
@@ -426,7 +426,7 @@ handle_op(?SSH_FXP_WRITE, ReqId,
 	  <<?UINT32(HLen), BinHandle:HLen/binary, ?UINT64(Offset),
 	   ?UINT32(Len), Data:Len/binary>>, State) ->
     case get_handle(State#state.handles, BinHandle) of
-	{_Handle, file, {_Path, IoDevice}} ->
+	{_Handle, file, {_AbsPath, IoDevice}} ->
 	    write_file(ReqId, IoDevice, Offset, Data, State);
 	_ ->
 	    ssh_xfer:xf_send_status(State#state.xf, ReqId,
@@ -469,8 +469,8 @@ handle_op(?SSH_FXP_FSETSTAT, ReqId, <<?U
 	  State0 = #state{handles = Handles}) ->
 
     case get_handle(Handles, BinHandle) of
-	{_Handle, _Type, {Path,_}} ->
-	    {Status, State1} = set_stat(Attr, Path, State0),
+	{_Handle, _Type, {AbsPath,_}} ->
+	    {Status, State1} = set_stat(Attr, AbsPath, State0),
 	    send_status(Status, ReqId, State1);
 	_ ->
 	    ssh_xfer:xf_send_status(State0#state.xf, ReqId,
@@ -580,8 +580,7 @@ get_handle(Handles, BinHandle) ->
 
 %%% read_dir/5: read directory, send names, and return new state
 read_dir(State0 = #state{file_handler = FileMod, max_files = MaxLength, file_state = FS0},
-	 XF = #ssh_xfer{cm = _CM, channel = _Channel, vsn = Vsn}, ReqId, Handle, RelPath, {cache, Files}) ->
-    AbsPath = relate_file_name(RelPath, State0),
+	 XF = #ssh_xfer{cm = _CM, channel = _Channel, vsn = Vsn}, ReqId, Handle, AbsPath, {cache, Files}) ->
     if
 	length(Files) > MaxLength ->
 	    {ToSend, NewCache} = lists:split(MaxLength, Files),
@@ -589,19 +588,18 @@ read_dir(State0 = #state{file_handler =
 	    ssh_xfer:xf_send_names(XF, ReqId, NamesAndAttrs),
 	    Handles = lists:keyreplace(Handle, 1,
 				       State0#state.handles,
-				       {Handle, directory, {RelPath,{cache, NewCache}}}),
+				       {Handle, directory, {AbsPath,{cache, NewCache}}}),
 	    State0#state{handles = Handles, file_state = FS1};
 	true ->
 	    {NamesAndAttrs, FS1} = get_attrs(AbsPath, Files, FileMod, FS0, Vsn),
 	    ssh_xfer:xf_send_names(XF, ReqId, NamesAndAttrs),
 	    Handles = lists:keyreplace(Handle, 1,
 				       State0#state.handles,
-				       {Handle, directory, {RelPath,eof}}),
+				       {Handle, directory, {AbsPath,eof}}),
 	    State0#state{handles = Handles, file_state = FS1}
     end;
 read_dir(State0 = #state{file_handler = FileMod, max_files = MaxLength, file_state = FS0},
-	 XF = #ssh_xfer{cm = _CM, channel = _Channel, vsn = Vsn}, ReqId, Handle, RelPath, _Status) ->
-    AbsPath = relate_file_name(RelPath, State0),
+	 XF = #ssh_xfer{cm = _CM, channel = _Channel, vsn = Vsn}, ReqId, Handle, AbsPath, _Status) ->
     {Res, FS1} = FileMod:list_dir(AbsPath, FS0),
     case Res of
 	{ok, Files} when MaxLength == 0 orelse MaxLength > length(Files) ->
@@ -609,7 +607,7 @@ read_dir(State0 = #state{file_handler =
 	    ssh_xfer:xf_send_names(XF, ReqId, NamesAndAttrs),
 	    Handles = lists:keyreplace(Handle, 1,
 				       State0#state.handles,
-				       {Handle, directory, {RelPath,eof}}),
+				       {Handle, directory, {AbsPath,eof}}),
 	    State0#state{handles = Handles, file_state = FS2};
 	{ok, Files} ->
 	    {ToSend, Cache} = lists:split(MaxLength, Files),
@@ -617,7 +615,7 @@ read_dir(State0 = #state{file_handler =
 	    ssh_xfer:xf_send_names(XF, ReqId, NamesAndAttrs),
 	    Handles = lists:keyreplace(Handle, 1,
 				       State0#state.handles,
-				       {Handle, directory, {RelPath,{cache, Cache}}}),
+				       {Handle, directory, {AbsPath,{cache, Cache}}}),
 	    State0#state{handles = Handles, file_state = FS2};
 	{error, Error} ->
 	    State1 = State0#state{file_state = FS1},
@@ -673,13 +671,13 @@ get_long_name(FileName, I) when is_recor
         I#file_info.mode, I#file_info.uid, I#file_info.gid}).
 
 %%% get_attrs: get stat of each file and return
-get_attrs(RelPath, Files, FileMod, FS, Vsn) ->
-    get_attrs(RelPath, Files, FileMod, FS, Vsn, []).
+get_attrs(AbsBase, Files, FileMod, FS, Vsn) ->
+    get_attrs(AbsBase, Files, FileMod, FS, Vsn, []).
 
-get_attrs(_RelPath, [], _FileMod, FS, _Vsn, Acc) ->
+get_attrs(_AbsBase, [], _FileMod, FS, _Vsn, Acc) ->
     {lists:reverse(Acc), FS};
-get_attrs(RelPath, [F | Rest], FileMod, FS0, Vsn, Acc) ->
-    Path = filename:absname(F, RelPath),
+get_attrs(AbsBase, [F | Rest], FileMod, FS0, Vsn, Acc) ->
+    Path = filename:absname(F, AbsBase),
     case FileMod:read_link_info(Path, FS0) of
 	{{ok, Info}, FS1} ->
 		Name = if Vsn =< 3 ->
@@ -689,12 +687,12 @@ get_attrs(RelPath, [F | Rest], FileMod,
 			 F
 	     end,
 	    Attrs = ssh_sftp:info_to_attr(Info),
-	    get_attrs(RelPath, Rest, FileMod, FS1, Vsn, [{Name, Attrs} | Acc]);
+	    get_attrs(AbsBase, Rest, FileMod, FS1, Vsn, [{Name, Attrs} | Acc]);
 	{{error, Msg}, FS1} when 
               Msg == enoent ;   % The item has disappeared after reading the list of items to check
               Msg == eacces ->  % You are not allowed to read this
             %% Skip this F and check the remaining Rest
-	    get_attrs(RelPath, Rest, FileMod, FS1, Vsn, Acc);
+	    get_attrs(AbsBase, Rest, FileMod, FS1, Vsn, Acc);
 	{Error, FS1} ->
 	    {Error, FS1}
     end.
@@ -717,23 +715,25 @@ fstat(Vsn, ReqId, Data, State) when Vsn
 
 fstat(ReqId, BinHandle, State) ->
     case get_handle(State#state.handles, BinHandle) of
-	{_Handle, _Type, {Path, _}} ->
-	    stat(ReqId, Path, State, read_file_info);
+	{_Handle, _Type, {AbsPath, _}} ->
+	    do_stat(ReqId, AbsPath, State, read_file_info);
 	_ ->
 	    ssh_xfer:xf_send_status(State#state.xf, ReqId, 
 				    ?SSH_FX_INVALID_HANDLE),
 	    State
     end.
 
-stat(ReqId, RelPath, State0=#state{file_handler=FileMod, 
-				   file_state=FS0}, F) ->
+stat(ReqId, RelPath, State0, F) ->
     AbsPath = relate_file_name(RelPath, State0),
+    do_stat(ReqId, AbsPath, State0, F).
+
+do_stat(ReqId, AbsPath, State0=#state{file_handler=FileMod, file_state=FS0}, F) ->
     XF = State0#state.xf,
     {Res, FS1} = FileMod:F(AbsPath, FS0),
     State1 = State0#state{file_state = FS1},
     case Res of
 	{ok, FileInfo} ->
-	    ssh_xfer:xf_send_attr(XF, ReqId, 
+	    ssh_xfer:xf_send_attr(XF, ReqId,
 				  ssh_sftp:info_to_attr(FileInfo)),
 	    State1;
 	{error, E} ->
@@ -843,7 +843,7 @@ do_open(ReqId, State0, Path, Flags) ->
 	    State1 = State0#state{file_state = FS1},
 	    case Res of
 		{ok, IoDevice} ->
-		    add_handle(State1, State0#state.xf, ReqId, file, {Path,IoDevice});
+		    add_handle(State1, State0#state.xf, ReqId, file, {AbsPath,IoDevice});
 		{error, Error} ->
 		    ssh_xfer:xf_send_status(State1#state.xf, ReqId,
 					    ssh_xfer:encode_erlang_status(Error)),
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE.erl
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -104,7 +104,8 @@ all() ->
      root_with_cwd,
      relative_path,
      open_file_dir_v5,
-     open_file_dir_v6].
+     open_file_dir_v6,
+     access_attributes_outside_root].
 
 groups() -> 
     [].
@@ -140,6 +141,7 @@ end_per_group(_GroupName, Config) ->
 %%--------------------------------------------------------------------
 
 init_per_testcase(TestCase, Config) ->
+    {OsFamily, _} = os:type(),
     ssh:start(),
     prep(Config),
     PrivDir = proplists:get_value(priv_dir, Config),
@@ -150,7 +152,7 @@ init_per_testcase(TestCase, Config) ->
 	       {user_dir, PrivDir},
 	       {user_passwords,[{?USER, ?PASSWD}]},
 	       {pwdfun, fun(_,_) -> true end}],
-    {ok, Sftpd} = case TestCase of
+    Result = case TestCase of
 		      ver6_basic ->
 			  SubSystems = [ssh_sftpd:subsystem_spec([{sftpd_vsn, 6}])],
 			  ssh:daemon(0, [{subsystems, SubSystems}|Options]);
@@ -164,6 +166,14 @@ init_per_testcase(TestCase, Config) ->
                           SubSystems = [ssh_sftpd:subsystem_spec([{root, RootDir},
                                                                   {cwd, CWD}])],
                           ssh:daemon(0, [{subsystems, SubSystems}|Options]);
+                      access_attributes_outside_root when OsFamily =:= win32 ->
+                          {skip, "Not implemented on windows"};
+                      access_attributes_outside_root ->
+                          Rand = integer_to_list(rand:uniform(1000000)),
+                          RootDir = filename:join("/tmp", Rand),
+                          ok = file:make_dir(RootDir),
+                          SubSystems = [ssh_sftpd:subsystem_spec([{root, RootDir}])],
+                          ssh:daemon(0, [{subsystems, SubSystems}|Options]);
 		      root_with_cwd ->
 			  RootDir = filename:join(PrivDir, root_with_cwd),
 			  CWD     = filename:join(RootDir, home),
@@ -186,41 +196,53 @@ init_per_testcase(TestCase, Config) ->
 			  ssh:daemon(0, [{subsystems, SubSystems}|Options])
 		  end,
 
-    Port = ssh_test_lib:daemon_port(Sftpd),
-    
-    Cm = ssh_test_lib:connect(Port,
-			      [{user_dir, ClientUserDir},
-			       {user, ?USER}, {password, ?PASSWD},
-			       {user_interaction, false},
-			       {silently_accept_hosts, true}]),
-    {ok, Channel} =
-	ssh_connection:session_channel(Cm, ?XFER_WINDOW_SIZE,
-				       ?XFER_PACKET_SIZE, ?SSH_TIMEOUT),
-    
-    success = ssh_connection:subsystem(Cm, Channel, "sftp", ?SSH_TIMEOUT),
-
-    ProtocolVer = case atom_to_list(TestCase) of
-		      "ver3_" ++ _ ->
-			  3;
-		      _ ->
-			  ?SSH_SFTP_PROTOCOL_VERSION
-		  end,
-
-    Data = <<?UINT32(ProtocolVer)>> ,
-
-    Size = 1 + size(Data),
-
-    ssh_connection:send(Cm, Channel, << ?UINT32(Size),
-				      ?SSH_FXP_INIT, Data/binary >>),
-
-    {ok, <<?SSH_FXP_VERSION, ?UINT32(Version), _Ext/binary>>, _}
-	= reply(Cm, Channel),
-
-    ct:log("Client: ~p Server ~p~n", [ProtocolVer, Version]),
-
-    [{sftp, {Cm, Channel}}, {sftpd, Sftpd }| Config].
+    case Result of
+        {ok, Sftpd} ->
+            Port = ssh_test_lib:daemon_port(Sftpd),
+            Cm = ssh_test_lib:connect(Port,
+                                      [{user_dir, ClientUserDir},
+                                       {user, ?USER}, {password, ?PASSWD},
+                                       {user_interaction, false},
+                                       {silently_accept_hosts, true}]),
+            {ok, Channel} =
+                ssh_connection:session_channel(Cm, ?XFER_WINDOW_SIZE,
+                                               ?XFER_PACKET_SIZE, ?SSH_TIMEOUT),
+            success = ssh_connection:subsystem(Cm, Channel, "sftp", ?SSH_TIMEOUT),
+
+            ProtocolVer = case atom_to_list(TestCase) of
+                              "ver3_" ++ _ ->
+                                  3;
+                              _ ->
+                                  ?SSH_SFTP_PROTOCOL_VERSION
+                          end,
+
+            Data = <<?UINT32(ProtocolVer)>> ,
+ 
+            Size = 1 + size(Data),
+            ssh_connection:send(Cm, Channel, << ?UINT32(Size),
+                                                ?SSH_FXP_INIT, Data/binary >>),
+ 
+            {ok, <<?SSH_FXP_VERSION, ?UINT32(Version), _Ext/binary>>, _}
+                = reply(Cm, Channel),
+            ct:log("Client: ~p Server ~p~n", [ProtocolVer, Version]),
+            [{sftp, {Cm, Channel}}, {sftpd, Sftpd }| Config];
+        Other ->
+            Other
+    end.
 
+end_per_testcase(access_attributes_outside_root, Config) ->
+    Sftpd = proplists:get_value(sftpd, Config),
+    {ok, DaemonInfo} = ssh:daemon_info(Sftpd),
+    ssh_cleanup(Config),
+    DaemonOpts = proplists:get_value(options, DaemonInfo),
+    Subsystems = proplists:get_value(subsystems, DaemonOpts),
+    {_, {_, SftpdOpts}} = lists:keyfind("sftp", 1, Subsystems),
+    RootDir = proplists:get_value(root, SftpdOpts),
+    file:del_dir_r(RootDir);
 end_per_testcase(_TestCase, Config) ->
+    ssh_cleanup(Config).
+
+ssh_cleanup(Config) ->
     try
         ssh:stop_daemon(proplists:get_value(sftpd, Config))
     catch
@@ -828,6 +850,53 @@ open_file_dir_v6(Config) when is_list(Co
                   ?SSH_FXF_OPEN_EXISTING).
 
 %%--------------------------------------------------------------------
+access_attributes_outside_root(Config) when is_list(Config) ->
+    Sftpd = proplists:get_value(sftpd, Config),
+    {ok, DaemonInfo} = ssh:daemon_info(Sftpd),
+    DaemonOpts = proplists:get_value(options, DaemonInfo),
+    Subsystems = proplists:get_value(subsystems, DaemonOpts),
+    {_, {_, SftpdOpts}} = lists:keyfind("sftp", 1, Subsystems),
+    RootDir = proplists:get_value(root, SftpdOpts),
+
+    TargetName = "target-" ++ filename:basename(RootDir) ++ ".txt",
+    InsideRootFile = filename:join([RootDir, "tmp", TargetName]),
+    ok = file:make_dir(filename:dirname(InsideRootFile)),
+    ok = file:write_file(InsideRootFile, <<"inside root">>),
+    {ok, InsideRootFileInfo} = file:read_file_info(InsideRootFile),
+    InsideRootFileMode = InsideRootFileInfo#file_info.mode,
+
+    OutsideRootFile = filename:join("/tmp", TargetName),
+    ok = file:write_file(OutsideRootFile, <<"outside root">>),
+    try
+        {ok, OutsideRootFileInfo} = file:read_file_info(OutsideRootFile),
+        OutsideRootFileMode = OutsideRootFileInfo#file_info.mode,
+
+        {Cm, Channel} = proplists:get_value(sftp, Config),
+        ReqId0 = 0,
+        {ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId0), Handle/binary>>, _} =
+            open_file(OutsideRootFile, Cm, Channel, ReqId0,
+                      ?ACE4_READ_DATA bor ?ACE4_WRITE_ATTRIBUTES,
+                      ?SSH_FXF_OPEN_EXISTING),
+
+        Attrs = [?uint32(?SSH_FILEXFER_ATTR_PERMISSIONS), ?byte(?SSH_FILEXFER_TYPE_REGULAR),
+                 ?uint32(not_default_permissions())],
+
+        ReqId1 = 1,
+        {ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId1), ?UINT32(?SSH_FX_OK), _/binary>>, _} =
+            set_attributes_open_file(Handle, Attrs, Cm, Channel, ReqId1),
+
+        {ok, NewOutsideRootFileInfo} = file:read_file_info(OutsideRootFile),
+        NewOutsideRootFileMode = NewOutsideRootFileInfo#file_info.mode,
+        ?assertEqual(OutsideRootFileMode, NewOutsideRootFileMode),
+
+        {ok, NewInsideRootFileInfo} = file:read_file_info(InsideRootFile),
+        NewInsideRootFileMode = NewInsideRootFileInfo#file_info.mode,
+        ?assertNotEqual(InsideRootFileMode, NewInsideRootFileMode)
+    after
+        file:delete(OutsideRootFile)
+    end.
+
+%%--------------------------------------------------------------------
 %% Internal functions ------------------------------------------------
 %%--------------------------------------------------------------------
 prep(Config) ->
@@ -841,7 +910,9 @@ prep(Config) ->
     %% Initial config
     DataDir = proplists:get_value(data_dir, Config),
     FileName = filename:join(DataDir, "test.txt"),
-    file:copy(FileName, TestFile),
+    {ok, Data0} = file:read_file(FileName),
+    Data = ssh_test_lib:remove_comment(Data0),
+    ok = file:write_file(TestFile, string:chomp(Data)),
     Mode = 8#00400 bor 8#00200 bor 8#00040, % read & write owner, read group
     {ok, FileInfo} = file:read_file_info(TestFile),
     ok = file:write_file_info(TestFile,
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_test_lib.erl
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/test/ssh_test_lib.erl
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_test_lib.erl
@@ -124,7 +124,8 @@ setup_known_host/3,
 get_addr_str/0,
 file_base_name/2,
 kex_strict_negotiated/2,
-event_logged/3
+event_logged/3,
+remove_comment/1
         ]).
 %% logger callbacks and related helpers
 -export([log/2,
@@ -1218,10 +1219,12 @@ setup_all_user_keys(DataDir, UserDir) ->
 setup_user_key(SshAlg, DataDir, UserDir) ->
     file:make_dir(UserDir),
     %% Copy private user key to user's dir
-    {ok,_} = file:copy(filename:join(DataDir, file_base_name(user_src,SshAlg)),
-                       filename:join(UserDir, file_base_name(user,SshAlg))),
+    {ok, Priv0} = file:read_file(filename:join(DataDir, file_base_name(user_src,SshAlg))),
+    Priv = remove_comment(Priv0),
+    ok = file:write_file(filename:join(UserDir, file_base_name(user,SshAlg)), Priv),
     %% Setup authorized_keys in user's dir
-    {ok,Pub} = file:read_file(filename:join(DataDir, file_base_name(user_src,SshAlg)++".pub")),
+    {ok,Pub0} = file:read_file(filename:join(DataDir, file_base_name(user_src,SshAlg)++".pub")),
+    Pub = remove_comment(Pub0),
     ok = file:write_file(filename:join(UserDir, "authorized_keys"),
                          io_lib:format("~n~s~n",[Pub]),
                          [append]),
@@ -1239,19 +1242,26 @@ setup_host_key_create_dir(SshAlg, DataDi
 setup_host_key(SshAlg, DataDir, SysDir) ->
     mk_dir_path(SysDir),
     %% Copy private host key to system's dir
-    {ok,_} = file:copy(filename:join(DataDir, file_base_name(system_src,SshAlg)),
-                       filename:join(SysDir,  file_base_name(system,SshAlg))),
+    {ok,Priv0} = file:read_file(filename:join(DataDir, file_base_name(system_src,SshAlg))),
+    Priv = remove_comment(Priv0),
+    ok = file:write_file(filename:join(SysDir,  file_base_name(system,SshAlg)), Priv),
     ?ct_log_show_file( filename:join(SysDir,  file_base_name(system,SshAlg)) ),
     ok.
 
 setup_known_host(SshAlg, DataDir, UserDir) ->
-    {ok,Pub} = file:read_file(filename:join(DataDir, file_base_name(system_src,SshAlg)++".pub")),
+    {ok,Pub0} = file:read_file(filename:join(DataDir, file_base_name(system_src,SshAlg)++".pub")),
+    Pub = remove_comment(Pub0),
     S = lists:join(" ", lists:reverse(tl(lists:reverse(string:tokens(binary_to_list(Pub), " "))))),
     ok = file:write_file(filename:join(UserDir, "known_hosts"),
                          io_lib:format("~p~n",[S])),
     ?ct_log_show_file( filename:join(UserDir, "known_hosts") ),
     ok.
 
+remove_comment(Bin) ->
+    Lines = string:split(Bin, "\n", all),
+    FilteredLines = [L || L <- Lines, string:prefix(L, "#") == nomatch],
+    list_to_binary(lists:join("\n", FilteredLines)).
+
 
 get_addr_str() ->
     {ok, Hostname} = inet:gethostname(),
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/test.txt
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/test/ssh_sftpd_SUITE_data/test.txt
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/test.txt
@@ -1 +1,20 @@
-Sftp test file.
\ No newline at end of file
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+Sftp test file.
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_dsa
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/test/ssh_sftpd_SUITE_data/id_dsa
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_dsa
@@ -1,13 +1,31 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2012-2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
 -----BEGIN DSA PRIVATE KEY-----
-MIIBvAIBAAKBgQDfi2flSTZZofwT4yQT0NikX/LGNT7UPeB/XEWe/xovEYCElfaQ
-APFixXvEgXwoojmZ5kiQRKzLM39wBP0jPERLbnZXfOOD0PDnw0haMh7dD7XKVMod
-/EigVgHf/qBdM2M8yz1s/rRF7n1UpLSypziKjkzCm7JoSQ2zbWIPdmBIXwIVAMgP
-kpr7Sq3O7sHdb8D601DRjoExAoGAMOQxDfB2Fd8ouz6G96f/UOzRMI/Kdv8kYYKW
-JIGY+pRYrLPyYzUeJznwZreOJgrczAX+luHnKFWJ2Dnk5CyeXk67Wsr7pJ/4MBMD
-OKeIS0S8qoSBN8+Krp79fgA+yS3IfqbkJLtLu4EBaCX4mKQIX4++k44d4U5lc8pt
-+9hlEI8CgYEAznKxx9kyC6bVo7LUYKaGhofRFt0SYFc5PVmT2VUGRs1R6+6DPD+e
-uEO6IhFct7JFSRbP9p0JD4Uk+3zlZF+XX6b2PsZkeV8f/02xlNGUSmEzCSiNg1AX
-Cy/WusYhul0MncWCHMcOZB5rIvU/aP5EJJtn3xrRaz6u0SThF6AnT34CFQC63czE
-ZU8w8Q+H7z0j+a+70x2iAw==
+MIIBuwIBAAKBgQDIywHurUpOq6kZuMn+XlRzR4hAxF6qwSkuEqkV7iHnLQ0kIwf3
+uAmjFDhuEsQ8653SLxGVvTNp+KFFgDXiLqgM7TPUwDnpbvzEZHPAU+/zPt4sdY2D
+txBfJwT2SFlK6HPOxOcxdDuD+/a59sh8hk/YVOU7ZTcBVsVG8Got4UcF5QIVAPGd
+CPDQKSTlPiM9OwBB1+9p11k5AoGARLxw4l17mET9cU0uf4Ppe5nsCbODJv44ZrSs
+picvypGVLrLcN5KWbm3vjRFCQ5LFunAG3FwLC2Sh0CH6TemoIfRPsRHR7wvpBGdr
+c693UlMOis/mcmvNMQAzuQNW9WrxdzsvWR/r5s6NEHWqKUJGXSPi2d+Ijq/mCOmI
+hzLzyiACgYEAsTRcHZqZlamr0PM7jKt2edCpcd8rEFGtWuescebc6Ga5JGSv7Ue4
+cdYKpAjT10Mns1WYaU9t6ZR+6ARP7DkzzDmS1elwkRu21T+b81PmeZwaEJxgqr+C
+ROQVHgzpqMqEx8ic3c/juxZpRrCAlRCjCWSJLDMobBQvtfyG0qsleNgCFEjA7wTC
+sQCY/I35vb6GUJn9tEdP
 -----END DSA PRIVATE KEY-----
-
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_dsa.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_dsa.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ssh-dss AAAAB3NzaC1kc3MAAACBAMjLAe6tSk6rqRm4yf5eVHNHiEDEXqrBKS4SqRXuIectDSQjB/e4CaMUOG4SxDzrndIvEZW9M2n4oUWANeIuqAztM9TAOelu/MRkc8BT7/M+3ix1jYO3EF8nBPZIWUroc87E5zF0O4P79rn2yHyGT9hU5TtlNwFWxUbwai3hRwXlAAAAFQDxnQjw0Ckk5T4jPTsAQdfvaddZOQAAAIBEvHDiXXuYRP1xTS5/g+l7mewJs4Mm/jhmtKymJy/KkZUustw3kpZube+NEUJDksW6cAbcXAsLZKHQIfpN6agh9E+xEdHvC+kEZ2tzr3dSUw6Kz+Zya80xADO5A1b1avF3Oy9ZH+vmzo0QdaopQkZdI+LZ34iOr+YI6YiHMvPKIAAAAIEAsTRcHZqZlamr0PM7jKt2edCpcd8rEFGtWuescebc6Ga5JGSv7Ue4cdYKpAjT10Mns1WYaU9t6ZR+6ARP7DkzzDmS1elwkRu21T+b81PmeZwaEJxgqr+CROQVHgzpqMqEx8ic3c/juxZpRrCAlRCjCWSJLDMobBQvtfyG0qsleNg= uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa256
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa256
@@ -0,0 +1,24 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIJfCaBKIIKhjbJl5F8BedqlXOQYDX5ba9Skypllmx/w+oAoGCCqGSM49
+AwEHoUQDQgAE49RbK2xQ/19ji3uDPM7uT4692LbwWF1TiaA9vUuebMGazoW/98br
+N9xZu0L1AWwtEjs3kmJDTB7eJEGXnjUAcQ==
+-----END EC PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa256.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa256.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOPUWytsUP9fY4t7gzzO7k+Ovdi28FhdU4mgPb1LnmzBms6Fv/fG6zfcWbtC9QFsLRI7N5JiQ0we3iRBl541AHE= uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa384
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa384
@@ -0,0 +1,25 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN EC PRIVATE KEY-----
+MIGkAgEBBDCYXb6OSAZyXRfLXOtMo43za197Hdc/T0YKjgQQjwDt6rlRwqTh7v7S
+PV2kXwNGdWigBwYFK4EEACKhZANiAARN2khlJUOOIiwsWHEALwDieeZR96qL4pUd
+ci7aeGaczdUK5jOA9D9zmBZtSYTfO8Cr7ekVghDlcWAIJ/BXcswgQwSEQ6wyfaTF
+8FYfyr4l3u9IirsnyaFzeIgeoNis8Gw=
+-----END EC PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa384.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa384.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBE3aSGUlQ44iLCxYcQAvAOJ55lH3qovilR1yLtp4ZpzN1QrmM4D0P3OYFm1JhN87wKvt6RWCEOVxYAgn8FdyzCBDBIRDrDJ9pMXwVh/KviXe70iKuyfJoXN4iB6g2KzwbA== uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa521
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa521
@@ -0,0 +1,26 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN EC PRIVATE KEY-----
+MIHbAgEBBEFMadoz4ckEcClfqXa2tiUuYkJdDfwq+/iFQcpt8ESuEd26IY/vm47Q
+9UzbPkO4ou8xkNsQ3WvCRQBBWtn5O2kUU6AHBgUrgQQAI6GBiQOBhgAEAde5BRu5
+01/jS0jRk212xsb2DxPrxNpgp6IMCV8TA4Eps+8bSqHB091nLiBcP422HXYfuCd7
+XDjSs8ihcmhp0hCRASLqZR9EzW9W/SOt876May1Huj5X+WSO6RLe7vPn9vmf7kHf
+pip6m7M7qp2qGgQ3q2vRwS2K/O6156ohiOlmuuFs
+-----END EC PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa521.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ecdsa521.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAHXuQUbudNf40tI0ZNtdsbG9g8T68TaYKeiDAlfEwOBKbPvG0qhwdPdZy4gXD+Nth12H7gne1w40rPIoXJoadIQkQEi6mUfRM1vVv0jrfO+jGstR7o+V/lkjukS3u7z5/b5n+5B36YqepuzO6qdqhoEN6tr0cEtivzuteeqIYjpZrrhbA== uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed25519
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed25519
@@ -0,0 +1,26 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACDm9P8/gC0IOKmwHLSvkmEtS2Xx0RRqUDqC6wY6UgDVnwAAAJg3+6xpN/us
+aQAAAAtzc2gtZWQyNTUxOQAAACDm9P8/gC0IOKmwHLSvkmEtS2Xx0RRqUDqC6wY6UgDVnw
+AAAEBzC/Z2WGJhZ3l3tIBnUc6DCbp+lXY2yc2RRpWQTdf8sub0/z+ALQg4qbActK+SYS1L
+ZfHRFGpQOoLrBjpSANWfAAAAE3VhYmhuaWxAZWx4YWRsajNxMzIBAg==
+-----END OPENSSH PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed25519.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed25519.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOb0/z+ALQg4qbActK+SYS1LZfHRFGpQOoLrBjpSANWf uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed448
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed448
@@ -0,0 +1,29 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAASgAAAAlz
+c2gtZWQ0NDgAAAA53OqeePNaG/NJmoMbELhskKrAHNhLZ6AQm1WjbpMoseNl/OFh
+1xznExpUPqTLX36fHYsAaWRHABQAAAAA0AAAEREAABERAAAACXNzaC1lZDQ0OAAA
+ADnc6p5481ob80magxsQuGyQqsAc2EtnoBCbVaNukyix42X84WHXHOcTGlQ+pMtf
+fp8diwBpZEcAFAAAAAByzSPST3FCdOdENDI3uTKQ9RH2Ql+Y5kRZ/yA+iYUIP/32
+BQBVOrwOBc0CGEvbicTM1n4YeVEmfrMo3OqeePNaG/NJmoMbELhskKrAHNhLZ6AQ
+m1WjbpMoseNl/OFh1xznExpUPqTLX36fHYsAaWRHABQAAAAAAAECAwQ=
+-----END OPENSSH PRIVATE KEY-----
+
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed448.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_ed448.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ssh-ed448 AAAACXNzaC1lZDQ0OAAAADnc6p5481ob80magxsQuGyQqsAc2EtnoBCbVaNukyix42X84WHXHOcTGlQ+pMtffp8diwBpZEcAFAA= uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_rsa
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_rsa
@@ -0,0 +1,46 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAztjiyj2tdfkji0fewWS0kABg0IABgG20NvL1PnHJLr98we7w
+W7f3j27EGjW/ApuycsWXXKi0L82q8uDicoHHb3JI2JkT70oi0yG1Dx/zwPN+dkA7
+LBT1J3UK2hJTFPhp855CwY/ss9xpBsd1Fv3zuHifEqNGljeg1PjmQ3pNhxA/M0aZ
+cLnfIUdZ5Hr+t+4es3zaWo4tLBKmZu6BkVGQKPGXeMkIAMtJlG24l7qKDRkR5TYA
+ZT7P8Vn7hnuFuCNbrJSm686GawBxTQXom23dg9UcWxoHB7UiHFoR6j0bQAX+4R7b
+IwculRDcvzrgCu6u06oFILwY7MlsxpX9hGTl1wIDAQABAoIBAFeP6pmQeICrYceR
+OhQGLIWVE2bP+VLDnflw6i5v/qlieE6kdm1tOEgorK0nuV9CR81cJdIcvIJL/yTn
+3BR7KdDcwUenrY+rg4h7CWmIrigtK4ilciccDBeS7XAZN8B11GxDv6Cu65XMJU2w
+W7nK8URTE4vRQI1QqS3e26MPAAi/LVOt3ZPI6zg/GHEwnq0IVSQAOndLBr/IWZk5
+SANrkfwX8WS7/UxZgDptT9dyUQ5Pnj5mieTlIvBwyczdhZ7RDa8HdCSHW3xF83V1
+A0pkn6+TRojumYyr4RrPQj6htE64Hgx9w1Dv/UINjPXl5mGlbxQHMWGzlqD/qpyI
+wg7RakECgYEA+9ARZpHfEFz+EEFi8l9J+BtJDo00WaKCOZHh5UJ8W+NreqSd8nSx
+5u6wYwMJjRX2Hwv+FBEhxGbo1+ff6p++cYmiSlDtN2XRCDkBWvvGlxu55BDULrhx
+f8lqaV3XGmOy2rQusp8hiHmkmPJCSVj3oJqQnbqJ2zahXAx1rTPwHqECgYEA0kln
+4h+ZkZ+aldOMGF0d0txTcTqZvsSVKiFTSD9of/fiSDqb6xtLT2+ys6FZoFL9lyK8
+gtqH642CDQ+3WT6Nmn4kMF5HNVpEuCeRDeRhiquWeKaAQDyvZ5ym1+Cn3GhsO7Di
+d2LJKV5hOoN77loVY5nwnUVIJ0h+WLf0T7DTCXcCgYEAiNT7X50MdTvS4splFgcp
+jqRlAn9AXySrVtUqxwVlxhjCIpapLUK0GSTCvEq+OeghIaXGnujgTHUPOaNKTZgY
+SGHdyjxHar7s42b2kZYWx63NSVzLr8eSBTpRlIflhvV+DtGyPmWyNxLCmkmqM2kg
+xii3RL5EgtYgwIAUwdVjOYECgYBRPlsMWfkS8f7fc+PkZdVn6gey71kHAxw+MrHi
+b90H09Vw4nPq2Zi3EAiSrfvanTWsdpcuVw+8See89B16NViwH5wLs+D/E+kI3QCF
+xX6J/NEdu/ZA2zFJbpRnQzyXQyDNzwEv7tKZUQVvfe0boWIyIP99Q48k3jUyQZ/6
+Se6+8QKBgQCXl8H2K3CsZxoujKLb2qoEOPbxJQ2hxoMTS5XuQECReIVsNuptWrur
+DF8WJi/B6AqwRX1P3l56RNwqB1yDBqv0QVLpU7vU/FmWqLWTn0r3AvM74qftvfAE
+oa31wcYoCqPJoKgCG7TThLhNt2v5hL7sVgZNO0ueAiHhJbFLaf7ceg==
+-----END RSA PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_rsa.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/id_rsa.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO2OLKPa11+SOLR97BZLSQAGDQgAGAbbQ28vU+cckuv3zB7vBbt/ePbsQaNb8Cm7JyxZdcqLQvzary4OJygcdvckjYmRPvSiLTIbUPH/PA8352QDssFPUndQraElMU+GnznkLBj+yz3GkGx3UW/fO4eJ8So0aWN6DU+OZDek2HED8zRplwud8hR1nkev637h6zfNpaji0sEqZm7oGRUZAo8Zd4yQgAy0mUbbiXuooNGRHlNgBlPs/xWfuGe4W4I1uslKbrzoZrAHFNBeibbd2D1RxbGgcHtSIcWhHqPRtABf7hHtsjBy6VENy/OuAK7q7TqgUgvBjsyWzGlf2EZOXX uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_dsa_key
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_dsa_key
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_dsa_key
@@ -1,3 +1,22 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2012-2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
 -----BEGIN DSA PRIVATE KEY-----
 MIIBuwIBAAKBgQCClaHzE2ul0gKSUxah5W0W8UiJLy4hXngKEqpaUq9SSdVdY2LK
 wVfKH1gt5iuaf1FfzOhsIC9G/GLnjYttXZc92cv/Gfe3gR+s0ni2++MX+T++mE/Q
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_dsa_key.pub
===================================================================
--- otp-OTP-27.1.3.orig/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_dsa_key.pub
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_dsa_key.pub
@@ -1,3 +1,22 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2012-2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
 ---- BEGIN SSH2 PUBLIC KEY ----
 AAAAB3NzaC1kc3MAAACBAIKVofMTa6XSApJTFqHlbRbxSIkvLiFeeAoSqlpSr1JJ1V1j
 YsrBV8ofWC3mK5p/UV/M6GwgL0b8YueNi21dlz3Zy/8Z97eBH6zSeLb74xf5P76YT9B2
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key256
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key256
@@ -0,0 +1,24 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIMe4MDoit0t8RzSVPwkCBemQ9fhXL+xnTSAWISw8HNCioAoGCCqGSM49
+AwEHoUQDQgAEo2q7U3P6r0W5WGOLtM78UQtofM9UalEhiZeDdiyylsR/RR17Op0s
+VPGSADLmzzgcucLEKy17j2S+oz42VUJy5A==
+-----END EC PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key256.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key256.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKNqu1Nz+q9FuVhji7TO/FELaHzPVGpRIYmXg3YsspbEf0UdezqdLFTxkgAy5s84HLnCxCste49kvqM+NlVCcuQ= uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key384
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key384
@@ -0,0 +1,25 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN EC PRIVATE KEY-----
+MIGkAgEBBDArxbDfh3p1okrD9wQw6jJ4d4DdlBPD5GqXE8bIeRJiK41Sh40LgvPw
+mkqEDSXK++CgBwYFK4EEACKhZANiAAScl43Ih2lWTDKrSox5ve5uiTXil4smsup3
+CfS1XPjKxgBAmlfBim8izbdrT0BFdQzz2joduNMtpt61wO4rGs6jm0UP7Kim9PC7
+Hneb/99fIYopdMH5NMnk60zGO1uZ2vc=
+-----END EC PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key384.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key384.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBJyXjciHaVZMMqtKjHm97m6JNeKXiyay6ncJ9LVc+MrGAECaV8GKbyLNt2tPQEV1DPPaOh240y2m3rXA7isazqObRQ/sqKb08Lsed5v/318hiil0wfk0yeTrTMY7W5na9w== uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key521
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key521
@@ -0,0 +1,26 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN EC PRIVATE KEY-----
+MIHcAgEBBEIB8O1BFkl2HQjQLRLonEZ97da/h39DMa9/0/hvPZWAI8gUPEQcHxRx
+U7b09p3Zh+EBbMFq8+1ae9ds+ZTxE4WFSvKgBwYFK4EEACOhgYkDgYYABAAlWVjq
+Bzg7Wt4gE6UNb1lRE2cnlmH2L/A5uo6qZRx5lPnSKOxEhxSb/Oay1+9d6KRdrh6/
+vlhd9SHDBhLcAPDvWgBnJIEj92Q3pXX4JtoitL0yl+SvvU+vUh966mzHShHzj8p5
+ccOgPkPNoA70yrpGzkIhPezpZOQdCaOXj/jFqNCTDg==
+-----END EC PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key521.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ecdsa_key521.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAlWVjqBzg7Wt4gE6UNb1lRE2cnlmH2L/A5uo6qZRx5lPnSKOxEhxSb/Oay1+9d6KRdrh6/vlhd9SHDBhLcAPDvWgBnJIEj92Q3pXX4JtoitL0yl+SvvU+vUh966mzHShHzj8p5ccOgPkPNoA70yrpGzkIhPezpZOQdCaOXj/jFqNCTDg== uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed25519_key
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed25519_key
@@ -0,0 +1,26 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACBJSOuiYGWaO9lye8Bgafod1kw8P6cV3Xb2qJgCB6yJfQAAAJi+h4O7voeD
+uwAAAAtzc2gtZWQyNTUxOQAAACBJSOuiYGWaO9lye8Bgafod1kw8P6cV3Xb2qJgCB6yJfQ
+AAAEBaOcJfGPNemKc1wPHTCmM4Kwvh6dZ0CqY14UT361UnN0lI66JgZZo72XJ7wGBp+h3W
+TDw/pxXddvaomAIHrIl9AAAAE3VhYmhuaWxAZWx4YWRsajNxMzIBAg==
+-----END OPENSSH PRIVATE KEY-----
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed25519_key.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed25519_key.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIElI66JgZZo72XJ7wGBp+h3WTDw/pxXddvaomAIHrIl9 uabhnil@elxadlj3q32
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed448_key
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed448_key
@@ -0,0 +1,29 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAASgAAAAlz
+c2gtZWQ0NDgAAAA5X9dEm1m0Yf0s54fsYWrUah2hNCSFpw4fig6nXYDpZ3jt8SR2
+m0bHBhvWeD3x5Q9s0foavq/oJWGAAAAA0AAAEREAABERAAAACXNzaC1lZDQ0OAAA
+ADlf10SbWbRh/Sznh+xhatRqHaE0JIWnDh+KDqddgOlneO3xJHabRscGG9Z4PfHl
+D2zR+hq+r+glYYAAAABybIKlYsuAjRDWMr6JyFE+v2ySnzTd+oyfY8mWDvbjSKNS
+jIo/zC8ETjmj/FuUSS+PAy51SaIAmPlbX9dEm1m0Yf0s54fsYWrUah2hNCSFpw4f
+ig6nXYDpZ3jt8SR2m0bHBhvWeD3x5Q9s0foavq/oJWGAAAAAAAECAwQ=
+-----END OPENSSH PRIVATE KEY-----
+
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed448_key.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_ed448_key.pub
@@ -0,0 +1,20 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+ssh-ed448 AAAACXNzaC1lZDQ0OAAAADlf10SbWbRh/Sznh+xhatRqHaE0JIWnDh+KDqddgOlneO3xJHabRscGG9Z4PfHlD2zR+hq+r+glYYA= 
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_rsa_key
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_rsa_key
@@ -0,0 +1,35 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDCZX+4FBDwZIh9y/Uxee1VJnEXlowpz2yDKwj8semM4q843337
+zbNfxHmladB1lpz2NqyxI175xMIJuDxogyZdsOxGnFAzAnthR4dqL/RWRWzjaxSB
+6IAO9SPYVVlrpZ+1hsjLW79fwXK/yc8VdhRuWTeQiRgYY2ek8+OKbOqz4QIDAQAB
+AoGANmvJzJO5hkLuvyDZHKfAnGTtpifcR1wtSa9DjdKUyn8vhKF0mIimnbnYQEmW
+NUUb3gXCZLi9PvkpRSVRrASDOZwcjoU/Kvww163vBUVb2cOZfFhyn6o2Sk88Tt++
+udH3hdjpf9i7jTtUkUe+QYPsia+wgvvrmn4QrahLAH86+kECQQDx5gFeXTME3cnW
+WMpFz3PPumduzjqgqMMWEccX4FtQkMX/gyGa5UC7OHFyh0N/gSWvPbRHa8A6YgIt
+n8DO+fh5AkEAzbqX4DOn8NY6xJIi42q7l/2jIA0RkB6P7YugW5NblhqBZ0XDnpA5
+sMt+rz+K07u9XZtxgh1xi7mNfwY6lEAMqQJBAJBEauCKmRj35Z6OyeQku59SPsnY
++SJEREVvSNw2lH9SOKQQ4wPsYlTGbvKtNVZgAcen91L5MmYfeckYE/fdIZECQQCt
+64zxsTnM1I8iFxj/gP/OYlJBikrKt8udWmjaghzvLMEw+T2DExJyb9ZNeT53+UMB
+m6O+B/4xzU/djvp+0hbhAkAemIt+rA5kTmYlFndhpvzkSSM8a2EXsO4XIPgGWCTT
+tQKS/tTly0ADMjN/TVy11+9d6zcqadNVuHXHGtR4W0GR
+-----END RSA PRIVATE KEY-----
+
Index: otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_rsa_key.pub
===================================================================
--- /dev/null
+++ otp-OTP-27.1.3/lib/ssh/test/ssh_sftpd_SUITE_data/ssh_host_rsa_key.pub
@@ -0,0 +1,24 @@
+# %CopyrightBegin%
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright Ericsson AB 2025. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# %CopyrightEnd%
+---- BEGIN SSH2 PUBLIC KEY ----
+AAAAB3NzaC1yc2EAAAADAQABAAAAgQDCZX+4FBDwZIh9y/Uxee1VJnEXlowpz2yDKwj8
+semM4q843337zbNfxHmladB1lpz2NqyxI175xMIJuDxogyZdsOxGnFAzAnthR4dqL/RW
+RWzjaxSB6IAO9SPYVVlrpZ+1hsjLW79fwXK/yc8VdhRuWTeQiRgYY2ek8+OKbOqz4Q==
+---- END SSH2 PUBLIC KEY ----
