All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] ssh-stress: Add hostkey generation
@ 2021-06-21 10:03 Joerg Vehlow
  2021-06-21 11:19 ` Petr Vorel
  2021-06-23 15:55 ` Petr Vorel
  0 siblings, 2 replies; 3+ messages in thread
From: Joerg Vehlow @ 2021-06-21 10:03 UTC (permalink / raw)
  To: ltp

From: Joerg Vehlow <joerg.vehlow@aox-tech.de>

If not specified, default host keys (in /etc/ssh) are used.
If the keys do not exist, the test will fail or sshd will try to
create the keys in the default location.

Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
 testcases/network/stress/ssh/ssh-stress.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/testcases/network/stress/ssh/ssh-stress.sh b/testcases/network/stress/ssh/ssh-stress.sh
index 997ad21db..baf1a7896 100755
--- a/testcases/network/stress/ssh/ssh-stress.sh
+++ b/testcases/network/stress/ssh/ssh-stress.sh
@@ -11,7 +11,7 @@ TST_TESTFUNC="test"
 TST_CNT=3
 TST_NEEDS_ROOT=1
 TST_NEEDS_TMPDIR=1
-TST_NEEDS_CMDS="sshd ssh od pkill pgrep"
+TST_NEEDS_CMDS="sshd ssh ssh-keygen od pkill pgrep"
 
 . tst_net.sh
 
@@ -56,8 +56,15 @@ TCPKeepAlive yes
 UseDNS no
 StrictModes no
 PidFile $TST_TMPDIR/sshd.pid
+HostKey $TST_TMPDIR/ssh_host_rsa_key
+HostKey $TST_TMPDIR/ssh_host_ecdsa_key
+HostKey $TST_TMPDIR/ssh_host_ed25519_key
 EOF
 
+	ssh-keygen -q -N "" -t rsa -b 4096 -f $TST_TMPDIR/ssh_host_rsa_key
+	ssh-keygen -q -N "" -t ecdsa -f $TST_TMPDIR/ssh_host_ecdsa_key
+	ssh-keygen -q -N "" -t ed25519 -f $TST_TMPDIR/ssh_host_ed25519_key
+
 	tst_res TINFO "Generate configuration file and key at the remote host"
 	tst_rhost_run -s -c "ssh-keygen -t rsa -N \"\" -f $TST_TMPDIR/id_rsa \
 		>/dev/null"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] ssh-stress: Add hostkey generation
  2021-06-21 10:03 [LTP] [PATCH] ssh-stress: Add hostkey generation Joerg Vehlow
@ 2021-06-21 11:19 ` Petr Vorel
  2021-06-23 15:55 ` Petr Vorel
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-06-21 11:19 UTC (permalink / raw)
  To: ltp

Hi Joerg,

LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] ssh-stress: Add hostkey generation
  2021-06-21 10:03 [LTP] [PATCH] ssh-stress: Add hostkey generation Joerg Vehlow
  2021-06-21 11:19 ` Petr Vorel
@ 2021-06-23 15:55 ` Petr Vorel
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-06-23 15:55 UTC (permalink / raw)
  To: ltp

Hi Joerg,

merged, thanks!

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-23 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 10:03 [LTP] [PATCH] ssh-stress: Add hostkey generation Joerg Vehlow
2021-06-21 11:19 ` Petr Vorel
2021-06-23 15:55 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.