![Digi Digi CM 16 User Manual Download Page 151](http://html1.mh-extra.com/html/digi/digi-cm-16/digi-cm-16_user-manual_2496441151.webp)
Command line interface
Example scripts
Digi CM User Guide
151
4
Reboot
reboot
Note
If you factory default the unit, the '/usr2/rc.user' script file is moved to '/usr2/rc.user.old#'
and the default rc.user file will be restored.
Example script: Limiting root access to the console on Digi CM products (for SSH only)
This prevents root access from any means except physically logging in on the Digi CM console.
1
Modify '/etc/inetd.conf' and append
-f /usr2/sshd_config
to the sshd line.
cp /etc/inetd.conf /usr2/inetd.conf
2
Edit '/etc/ssh/sshd_config'. Change "PermitRootLogin" to
no
.
cp /etc/ssh/sshd_config /usr2
3
Add the following commands in the '/usr2/rc.user' script. Add these commands just above "exit
0":
cp -a /usr2/inetd.conf /etc/inetd.conf
while killall inetd 2>/dev/null;
do sleep 5;
done
/usr/sbin/inetd
4
Reboot
reboot
Note
If you factory default the unit, the '/usr2/rc.user' script file is moved to '/usr2/rc.user.old#'
and the default rc.user file will be restored.
Example script: Sending a break from an existing session with the Digi CM unit from a Telnet session
If the Telnet was initiated from a UNIX command line Telnet client
. Issuing the Telnet escape
sequence '^]' (control-right_square_bracket) will take you to the 'telnet>' prompt.
telnet>send brk
Note
Other Telnet clients often have a "send break" option.
From an ssh session
Type the [tilde-break] which is the default ssh break characters.
~break
The ssh break can changed from the Web UI or config menu under
Serial ports
>
Configuration
>
Host mode configuration
> SSH break sequence
Additional binaries or applications can be added to /usr2 such as:
▪
crontab
▪
netstat
▪
fuser
To download these utilities go to:
https://www.digi.com/products/consoleservers/
digicm#productsupport
Summary of Contents for Digi CM 16
Page 1: ...User Guide Digi CM 8 port 16 port 32 port and 48 port...
Page 63: ...Digi CM User Guide 63 User administration Administer users 64...
Page 130: ...Power Controller Cascade multiple Digi RPM units Digi CM User Guide 130...
Page 131: ...Digi CM User Guide 131 Port clustering Introduction 132 Configure port clustering 132...