u9cpu
One nice feature of
drawtermand Plan9'scpuandncpuis 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
scpscp anotherfile hostname:
drawterm hostnamecp /mnt/term/file .- do stuff on
hostnamecp /mnt/term/anotherfile .Can we do that over
ssh, too?
One could try diverse trickery withsftpthrough FUSE, or NFS/CIFS/WhateverFS exports.I explored the following path closer to the Plan9 original:
Unix-like systems can runu9fsto export directories over 9p, and9pfsto mount them. Forwardingu9fs's in/output throughsshcaused strange errors. Usingsocatto bind the filedescriptors to a TCP socket onlocalhostand forwarding that throughsshworks.
The result is u9cpu.sh, which mounts a given directory (default$HOME/tmp) as/mnt/termon 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