u9cpu
One nice feature of
drawterm
and Plan9'scpu
andncpu
is that parts of the local filesystem appear on the remote machine as/mnt/term
.So instead of
one can simply do
ssh hostname
- dang, forgot that file
- open local shell in new tmux/xterm/screen
scp file hostname:
- back to the shell with
ssh hostname
- do stuff on
hostname
- dang another file not there
- back to the shell with the
scp
scp anotherfile hostname:
drawterm hostname
cp /mnt/term/file .
- do stuff on
hostname
cp /mnt/term/anotherfile .
Can we do that over
ssh
, too?
One could try diverse trickery withsftp
through FUSE, or NFS/CIFS/WhateverFS exports.I explored the following path closer to the Plan9 original:
Unix-like systems can runu9fs
to export directories over 9p, and9pfs
to mount them. Forwardingu9fs
's in/output throughssh
caused strange errors. Usingsocat
to bind the filedescriptors to a TCP socket onlocalhost
and forwarding that throughssh
works.
The result is u9cpu.sh, which mounts a given directory (default$HOME/tmp
) as/mnt/term
on the remote machine and then opens a shell there.UPDATE Ron Minnich of Plan9 fame has implemented something similiar in Go: u-root/cpu.
Tue, 15 Feb 2022
[/plan9]
permanent link