Ok, emulation it shall be then ... Finalized test steps: 1. On x86 get an emulated s390x guest the way you prefer Example with uvtool + modifications: $ sudo apt install qemu-system-s390x $ uvt-simplestreams-libvirt --verbose sync --source http://cloud-images.ubuntu.com/daily arch=s390x label=daily release=focal $ uvt-kvm create --password=ubuntu qemu-s390x-tcg release=focal arch=s390x label=daily $ virsh destroy qemu-s390x-tcg That image will obviously fail to run in x86, so adapt the Guest XML to use tcg Use something like: qemu-s390x-tcg cfac1691-2da7-49bb-bf09-c7f0cdefcf85 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYv7mW5g+YoZH1w7v0BNTjfRA/IWM4xSKyH6zwly4W0Zl6pq1XZzO/HyoRDDVb9cXjzggyrMAKTY9749uGwg1X92OEEyJ5nOcuuhNcZJ2bgmWfvo+EqzYS8WR271Iuz3w+BQzpW6XQj7G/tnQPlnmkboFyz0UWdPhlVaBuS6LQbnRHrPWe/gc20NgOaRQf9Jq5GmXO4YywYiXJpQgqu4vrEwr1d/LQcd4oZMnErvLsCZ0pUlQK3WYHSk3F2kWaBigJsJHS6zhkGUdAFlIEqSbjuNuhuyFMdRUyAvHnY7whXOHKUsChnSinqescwfSjk2dHEOqxeIL1AyYxAzRtRd6U4F14BhoG5gphKFrle5oIf6tVidjReEHNCWfAaJPMSmRBhoaSRA4YKq/7T58dKp6FvqlmceT21lJOzRWtSp7C1xCxhomWNJFUBpupmL5WdPDfdvmqiUQaKrRBymP+yOp18TSEhqZrbvNUMsIOl8lkllnRlyp2CiQXA5RvgshKIA0= root@localhost ssh-dss AAAAB3NzaC1kc3MAAACBALdhwADEpIp/K23jFoXlLeSi6bbGyXs+wIiQgITaSrOBVnEA63kyckWXCn/0A8zXEWF11Y4uNikZJL+49vJu412IFfVgzV8tHYnq7cVAT/WJMencfWkYFNnyqtn8w7jk3DoSXvhcjs/saiswWzKbxpMazPBGNuNbM32rLmaKY4LZAAAAFQCfHHCB16tMrLleWCr9+1AItKDTQwAAAIEAoyUeXONb8/Tb+qMRN6/qfHAGZAwxEhd1LM8DKLhFsUxqFCpyhZr7QXic/RDt4Op3jMaLPht/Un3+l5nW/h4Vs0vSkC9Q8l0t/92DV67hT+lKRJXdfE4OGgUMC32jPhQ574JdOru+4wSJEXR4yCymP8BAkEr8l+LE8aa8cqO5tuMAAACAU8CQAsXsLKHm01ES/HqWxwk8skxHsaJuCwxdIZMbFVzWO8TcjftJ21ymg3t97PPeTiojTZrVgpIUemfP1spqlawf+VeXUat6Q0Uh6DF7KvjRb6DNkfGlxzIvO9LBsJmvc3VohSQ9psf3JNfoQh/NeGj6F3Yz8pi3NpOKpN+DRec= root@localhost ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGsr5+bBmrFA4Qfv94Dj+Qwm8GjR1WsWORBfZP8QPO0HmL9uOEvtPn12W6zchY+svA0u4136ZFp/I2hZ6LXOCf0= root@localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMstvO+G5089bnuUbur+pOz5RaDpx1IgtxOi3a510bSO root@localhost 524288 524288 1 hvm qemu destroy restart destroy /usr/bin/qemu-system-s390x
$ virsh start --console qemu-s390x-tcg # wait as in the emulator this will need a while. 2. In that guest prep the load Note you have to run those as root # prereq $ sudo apt update $ apt install binutils # define probe $ bash $ echo "r:bash_readline /usr/bin/bash:0x$(nm -D /usr/bin/bash | awk '/T readline$/ {print $1}')" > /sys/kernel/debug/tracing/uprobe_events # check if the probe is active and enable it $ cat /sys/kernel/debug/tracing/uprobe_events r:uprobes/bash_readline /usr/bin/bash:0x00000000000dd250 $ echo 1 >/sys/kernel/debug/tracing/events/uprobes/bash_readline/enable # Start bash (or actually do anything in your ssh login which also is in bash) to trigger some traces $ /usr/bin/bash -c 'echo $BASH_VERSION' Bad case: bash will exit on most activities (anything that involves readline like typing a command) Good case: bash survives Note: There are no log entries in Host qemu log or journal To reset the test case you can disable tracing from the outside without triggering readline like: $ uvt-kvm ssh qemu-s390x-tcg "echo 0 | sudo tee /sys/kernel/debug/tracing/events/uprobes/bash_readline/enable" 0 $ uvt-kvm ssh qemu-s390x-tcg "sudo cat /sys/kernel/debug/tracing/events/uprobes/bash_readline/enable" 0 Then you can ssh-log in again and now it would work in good and bad case: ubuntu@qemu-s390x-tcg:~$ /usr/bin/bash -c 'echo $BASH_VERSION' 5.0.17(1)-release