ssh2, sshsession, rsa2ssh2 – encrypted login and copy with foreign
systems via SSHv2|
ssh2 [ –adIiKkmrvx ] [ –l user ] [ –n dir ] [ –z attribute=value ]
system [ cmd [ args ] ] |
aux/sshsession [ –t ] [ –n namespace ] [ –R dir ] [ –r dir ] [ –s command ] [ –S srvpt ]
rsa2ssh2 [ file ]
These programs collectively implement communication via SSH v2
over TCP. All of the encryption, authentication, and SSH protocol
are handled by ssh(4). |
Ssh2 dials a remote system and runs a shell (or some other command) there. ssh2 root@hannibal will result in a command prompt on the machine hannibal logged in as root. If ssh2 does not find an SSH server in /net, it runs netssh (see ssh(4)) to start one. Ssh2 dials the remote SSH server and exchanges encryption keys with the server using Diffie–Hellman key exchange.
A clone file and connect message protocol similar to that of ip(3) creates a session in the established connection. In the course of session creation, ssh2 first attempts to authenticate the user with the server using public key authentication. If that fails, it prompts for a password, and attempts to authenticate with password authentication. It also passes across the value of the environment variable TERM as would be set if ssh2 is run inside of vt(1).
Per con(1), typing a control–\ will result in a >>> prompt. There are currently only four commands that can be issued at that prompt: c to continue the session, h to print a list of the available commands, r to toggle the suppression of carriage returns, and q to close the session.
–i –ISets ssh2 to interactive (–i) or non–interactive (–I) mode. This determines whether the user is prompted for a password if none is found in factotum. Without either of these options, ssh2 uses interactive mode if run in a term window.
–k Skip the attempt to authenticate using public key authentication.
–K Don't fall back to password authentication. If the public key authentication fails, ssh2 will exit.
–l Use user name on the remote system (deprecated).
–m Remove the special meaning of control–\. This is needed by scp to prevent that character in files being copied from triggering the special command mode.
–n Specify the network directory of an alternate network to use. The default is /net.
–r Strip carriage return characters coming from the remote system. This will normally be desired when running in a rio(1) window or from within win(1) in acme(1). It is normally not used when running ssh2 from within vt(1).
–z Used to specify which of several possible keys to use.
A system–wide SSH listener can be run by creating a file /rc/bin/service.auth/ssh22
that invokes sshsession:
–n Use a namespace other than the default /lib/namespace when starting the shell or running the requested command.
–r Run the SSH session in dir.
–R Like –r but also prevent any arguments, in the command to be executed, from accessing files outside this directory; primarily used to limit what scp can access.
–s Execute command instead of /bin/rc.
–S Create /srv/srvpt if an SSH server is not already mounted in /net.
–t Trust sshsession and run it in the same namespace as the listen that started it.
A private SSH listener can be run by starting netssh (see ssh(4))
then running listen1:
/sys/lib/ssh/keyring System–wide known host public keys.|
$home/lib/keyring Per–user known host public keys.
con(1), cpu(1), secstore(1), ssh1(1), vt(1), factotum(4), ssh(4),
RFCs 4250, 4251, 4252, 4253, 4254, and 4419
Sshsession shouldn't have to run as the host owner and using factotum(4)
correctly would permit this. |
The SSH v2 protocol is a classic second system: over–engineered,
overly complicated, misdesigned and jammed full of pointless goodies.