Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions demo/bin/ssh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@
# leaking the local machine. Do NOT install this on your PATH outside demos.

# ssh's argv: options (some take a value), the destination, then an optional
# remote command. Broadcast passes one; a session does not.
# remote command. Broadcast passes one; a session does not. `-E <file>` is
# where ssh writes its log; sshub passes a FIFO there.
dest=""
log=""
cmd=()
while [ $# -gt 0 ]; do
if [ -n "$dest" ]; then
cmd+=("$1")
# Broadcast sends `dest -- command`; like ssh, the `--` is not part of it.
[ ${#cmd[@]} -eq 0 ] && [ "$1" = "--" ] || cmd+=("$1")
else
case "$1" in
--) shift; dest="${1:-}" ;;
-[BbcDEeFIiJLlmOopQRSWw]) shift ;;
-E) shift; log="${1:-}" ;;
-[BbcDeFIiJLlmOopQRSWw]) shift ;;
-*) ;;
*) dest="$1" ;;
esac
Expand All @@ -29,10 +33,10 @@ host="${dest##*@}" # strip any user@ prefix for display

here="$(cd "$(dirname "$0")" && pwd)"

# sshub siphons the child's stderr (fd 2) into a side channel to hide ssh's
# `-v` handshake, and keys its "connecting → connected" header off it. Emit a
# believable handshake there, including the "Authenticated to" marker sshub
# looks for, so the session reads as genuinely connected.
# sshub reads ssh's `-E` log to show the handshake on the connect screen, and
# only an "Authenticated to" line there marks the session connected: until
# then the session takes no keystrokes. Emit a believable handshake into that
# log (stderr when there is none), marker included.
if [ ${#cmd[@]} -eq 0 ]; then
{
printf 'OpenSSH_9.6p1 Ubuntu-3ubuntu13, OpenSSL 3.0.13\n'
Expand All @@ -42,7 +46,7 @@ if [ ${#cmd[@]} -eq 0 ]; then
printf 'debug1: Host '\''%s'\'' is known and matches the ED25519 host key.\n' "$host"
printf 'debug1: Authenticated to %s ([%s]:22) using "publickey".\n' "$host" "$host"
printf 'debug1: channel 0: new session\n'
} >&2
} >"${log:-/dev/stderr}"

sleep 0.4
printf '\n'
Expand Down
Binary file modified demo/gifs/add-host.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/broadcast.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/connect.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/hero.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/navigate.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/sftp.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/snippets.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/gifs/themes.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions demo/record.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,12 @@ def navigate() -> Tape:
t.type("/").sleep(1.2).type("quad").sleep(1.6).key("esc").sleep(1.2)
# Group manager overlay (nested groups).
t.type("G").sleep(1.6).key("down").sleep(0.8).key("down").sleep(0.8).key("esc").sleep(1.2)
# Multi-tag filter: # opens the picker, Space toggles, Enter applies.
# Multi-tag filter: # opens the picker, Space toggles, Enter applies. The
# picker lists (all) then the tags alphabetically; #db AND #prod matches
# the two Cloudflare hosts, where the neighbours #ci and #db share none.
t.type("#").sleep(1.2)
t.key("down").sleep(0.7).key("space").sleep(0.8)
t.key("down").sleep(0.7).key("space").sleep(1.0).key("enter")
t.key("down", times=2, gap=0.7).sleep(0.7).key("space").sleep(0.8)
t.key("down", times=3, gap=0.7).sleep(0.7).key("space").sleep(1.0).key("enter")
t.sleep(3.5)
return t

Expand Down
Binary file modified demo/screenshots/add-host.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/hosts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/keybindings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/known-hosts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/palette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/sftp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/tags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/screenshots/theme-picker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading