SSH Reference Manual

$US SSH90A 48> run ssh -N -R 5021:localhost:23 testusr@10.0.0.234
SSH client version T9999H06_22Jan2014_comForte_SSH_0097
The N option suppresses the start of a remote shell. The R option tells the remote SSH daemon on host 10.0.0.234 to
listen on port 5021 and forward any incoming connection on that port to the local SSH2 process and this local process
will further forward to a telnet server on the local host, listening on loopback address, port 23. The "localhost" in the
command line refers to the target host of the forwarding tunnel, i.e. when using -R option this is the local host.
After the SSH session is successfully established, the SSH process will wait until the SSH session is terminated or it is
stopped.
On the remote host 10.0.0.234 you can establish a telnet session over the SSH tunnel as follows:
testusr@linux-dev:~$ telnet 127.0.0.1 5021
TELNET Client - T9558H01 - (19MAR12) - (IPMAAH)
Copyright Tandem Computers Incorporated 1992-1997
Trying...Connected to 127.0.0.1.
Escape character is '^]'.
WELCOME TO npns01 [PORT $ZTC1 #23 WINDOW $ZTN0.#PTYSYNS]
TELSERV - T9553H01 - (25SEP2009) - (IPMAEP)
Available Services:
OSS TACL EXIT
Enter Choice>
In this example the remote telnet client started on host 10.0.0.234 connects through the tunnel to the telnet server on the
local host that listens on loopback address 127.0.0.1, port 23.
Encrypted File Transfer
You can implement encrypted file transfers over SSH in various ways:
Use the SFTP or SFTPOSS clients to initiate and control SFTP sessions from the NonStop server
Use an SFTP client on a remote system to initiate and control SFTP sessions to the NonStop server from a
remote system.
Forward FTP connections over an SSH session.
To Connect a Remote SFTP Client to the NonStop Server
You can connect with an SFTP client on a remote system to SSH2 listening on the NonStop server as follows:
m.horst@np-dev02:~> sftp comf.mh@10.0.0.199
Connecting to 10.0.0.199...
comf.mh@10.0.0.199's password:
sftp> dir
a1000 auditlog bashhist bench benchcpu benchs2k benchs3k cryptand
emsacstm ftps fupcstm osstest osstzip rand1mio rs120157 scfcstm
secret sftpserv shhistor ssh stna48 t1000 t10000 t100000
t1000000 t10mio taclcstm test test101 testbin testbin2 testbin3
testbin4 trace2 tracecap z1000000 z1mio z1mio2 z1mio3 z1mioftp
z50mio zrand1m zz10mio zz1mio zzsa1894 zzsa7884 zzshgd zzz10m
zzz1mio
sftp>
To Connect to a Remote SSH Daemon from the NonStop Server Using a
NonStop SFTP Client
At the TACL prompt, run the SFTP client to create an SFTP session with a remote system as follows:
42 Installation & Quick Start HP NonStop SSH Reference Manual