PTERM is a line-mode terminal emulator for the CMS SSH package. It provides a way to interact with a terminal session over an encrypted channel. PTERM operates only in line mode; it does not provide 3270 or VT100 emulation.
PTERM Sample
PTERM may be invoked in three ways:
- With the command(s) on the command line
- An interactive session where commands may be entered
- With the specification of a file containing commands to be executed by the remote target
Command Line
For example, to connect to a remote target using a private key (the CMS file ECDSA PPK on any accessed disk) and executing the command “ls *.c” PTERM is invoked as follows:
pterm -i ecdsa.ppk neale@example.com ls *.c
crjl.c
dump.c
lic.c
mono-hwcap-s390x.c
njeDump.c
ssh2trnk.c
sshecc.c
sshsha.c
staging.c
stfle.c
test.c
unwind.c
Ready;
Interactive Session
For example, to invoke an interactive session using a private/public key pair (note your local terminal settings may result in VTxxx or similar escape sequences appearing):
pterm -i ecdsa.ppk neale@example.com
Using username "neale".
Last login: Thu Feb 16 21:04:02 2023 from
[neale@cts7xdev ~]$
stty -echo
stty -echo
[neale@cts7xdev ~]$
pwd
/home/neale
[neale@cts7xdev ~]$
TERM=dumb
[neale@cts7xdev ~]$
w
21:07:18 up 2 days, 14:19, 1 user, load average: 0.06, 0.10, 0.07
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
neale pts/0 snavm1.devlab.si 21:05 6.00s 2.14s 0.17s w
[neale@cts7xdev ~]$
exit
logout
Ready;
Batch
Using the file “PTERM BATCH”:
PTERM BATCH A1 F 80 Trunc=80 Size=4 Line=1 Col=1 Alt=0
====>
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
pwd
w
date
exit
* * * End of File * * *
PTERM is invoked using a private key:
pterm -i ecdsa.ppk -m pterm.batch neale@example.com
/home/neale
21:10:07 up 2 days, 14:22, 0 users, load average: 0.10, 0.10, 0.07
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
Thu Feb 16 21:10:07 EST 2023
Ready;