wolfssh/apps/wolfssh
John Safranek 2a15157cf6 scp, apps: correct three ssh->error reads
ReceiveScpConfirmation() takes a WS_EXTDATA off ScpStreamRead()'s
return, the rule ssh.h now states for reading an event.
FlushQueuedSend() samples the owed write with the session still
locked, since the peer reader thread writes ssh->error too, and
reports a send that failed there over the event it rode in on.

- A pass that delivers stderr while its flush short-writes returns
  WS_EXTDATA with WS_WANT_WRITE in ssh->error, so the confirmation
  read aborted the transfer with the stderr undrained.
- wolfSSH_stream_read() on the reader thread clears ssh->error with
  this thread's packet still queued, which ended the flush early and
  reported it a success.
- An event return with a hard send error latched collapsed to
  WS_SUCCESS, telling the caller a queued packet reached a socket
  that was gone.
2026-09-14 10:40:48 -07:00
..
README.md
common.c apps/wolfssh: Write known_hosts entries in binary mode 2026-09-10 15:27:50 -07:00
common.h
include.am
wolfssh.c scp, apps: correct three ssh->error reads 2026-09-14 10:40:48 -07:00

README.md

WOLFSSH CLIENT

The wolfSSH client will connect to a server and try to open a terminal. It'll default the username to your current username, and it will try to use your ecdsa private key to authenticate. The key file path is hard coded to $HOME/.ssh/id_ecdsa. It is currently far enough along I can use it. The private keys are the ones produced by the OpenSSL command line tool, not the ssh-keygen tool.

Phase 2 is going to bring reading the config files /etc/ssh/ssh_config and $HOME/.ssh/config. It will handle OpenSSH style modern keys. It will also have support for SSH-AGENT and forwarding.

Every session, terminal or command, runs its I/O on threads, so the client needs a threaded wolfSSL. Configuring --enable-sshclient against a single-threaded wolfSSL is an error, and --enable-all leaves the client out rather than failing.

Command Line Options

-E logfile    : Append the log to this file instead of stderr, and turn
                logging on. The log is empty unless the library has
                logging compiled in, with `--enable-debug` or
                `--enable-sshd`.
-G            : Print out the configuration as used.
-l login_name : Overrides the login name specified in the destination.
-p port       : Overrides the destination port number.
-V            : Print out the version.

The destination option is the only required option. It can be in the two following formats:

[user@]hostname
ssh://[user@]hostname[:port]

Anything after the destination is taken as a command to run on the server. With no command, the client opens an interactive terminal session.

The default value for user is the current user's login name. The default value for port is 22.