152
•
SSHCOM Command Reference
HP NonStop SSH Reference Manual
•
MKDIR: allows creation of directories on the NonStop system
•
RMDIR: allows removal of directories on the NonStop system
•
SYMLINK: allows creation of symbolic links on the NonStop system
•
ALL: shortcut for all operations
•
NONE: shortcut for no operation
Operations can be abbreviated as long as the abbreviation is unambiguous.
Example:
•
SFTP-SECURITY (WRITE,LIST)
o
will only allow perusal of files and uploading of files
o
can be abbreviated as SFTP-SECURITY (W,L)
SHELL-COMMAND
This attribute specifies a forced command that is to be executed rather than any command given by an exec request from
the SSH client. A forced command allows you to limit shell access to specific tasks or implement additional security
measures. SSH2 will retain the command given in the user's exec request, in the SSH_ORIGINAL_COMMAND
environment variable, to allow a shell script to analyze and/or execute the original command.
SHELL-ENVIRONMENT
The full OSS file name of a shell script preparing the shell environment for non-login shells (which are started without
executing /etc/profile or ~/.profile). The value will be used to set environment variable ENV (see man pages of ksh for
information on how the shell processes ENV). The attribute value (shell script) can contain absolute paths but also pre-
defined values like $HOME or ~.
SHELL-PROGRAM
This attribute specifies the path to the shell program that is to be used to start a shell or execute a command. Specify
*DEFAULT* or SHELL-PROGRAM without argument to make SSH2 use the default initial program configured for the
assigned SYSTEM-USER (e.g. by the INITIAL-PROGRAM attribute of a SAFEGUARD user).
If *MENU* is specified, the non-6530 session will be connected to a service menu provided by the STN PTYSERVER.
This resembles the functionality of TELSERV, providing dynamic services, as well as services connecting to static
windows. The services offered by the STN PTYSERVER process can be configured using STNCOM.
If *MENU* is followed by a service or window name, the corresponding service or window is automatically selected. If
the service or window does not exist, the STN menu will be displayed.
If the option FORCE is appended, then the user is forced to use the pre-configured STN service or window. In this case
the user will not see the STN menu, even when the configured service or window does not exist.
Example for setting up and invoking a non-login shell script (non-interactive) to execute in a ksh shell:
% ALTER USER xyx, SHELL-PROGRAM /bin/ksh
A ksh shell will be started when the SSH client is invoked.
The second step is to ensure that the PATH variable is set. For non-interactive shells the default scripts do not get
executed and the PATH is not defined. For this purpose, SHELL-ENVIRONMENT needs to be set via SSHCOM
command:
% ALTER USER xyz, SHELL-ENVIRONMENT /home/xyz/myPATH
In this example, the script /home/xyz/myPATH contains:
export PATH=$PATH:/usr/bin
The third step is to create an executable shell script /usr/bin/test-script, for example:
Содержание NonStop SSH 544701-014
Страница 12: ...xii Contents HP NonStop SSH Reference Manual ...
Страница 24: ...24 Preface HP NonStop SSH Reference Manual ...
Страница 30: ...30 Introduction HP NonStop SSH Reference Manual ...
Страница 46: ...46 Installation Quick Start HP NonStop SSH Reference Manual ...
Страница 132: ...132 The SSH User Database HP NonStop SSH Reference Manual ...
Страница 214: ...214 SSH and SFTP Client Reference HP NonStop SSH Reference Manual ...
Страница 278: ...278 STN Reference HP NonStop SSH Reference Manual ...
Страница 298: ...298 Monitoring and Auditing HP NonStop SSH Reference Manual ...
Страница 302: ...302 Performance Considerations HP NonStop SSH Reference Manual ...