Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Table of contents
Table of Contents | ||||
---|---|---|---|---|
|
‘vi’ and 'vim' text editors
Notes:
- When typing text, press <ESC> once finished. In case you’re blocked, press also <ESC> before executing commands described below
- both editors use case sensitive commands
Request | Command |
To quit without saving | Press ‘:’ then enter ‘q!’ |
To quit with saving | Press ‘:’ then enter ‘x’ or ‘wq’ |
Go to top of file | Press ‘:’ then enter ‘0’ |
Go to last line | Press ‘G’ |
Search pattern | Press ‘/’ then enter your search text. Press then ‘n’ for next (forward) or ‘N’ for backward |
Remove current character | Press ‘x’ |
Insert text | Press ‘i’ (press ESC once text completed) |
Insert line | Press ‘o’ for a line below cursor, ‘O’ for a line above cursor (press ESC once text completed) |
Delete a line | Press ‘dd’ |
‘gedit’ graphical editor
‘gedit’ is a graphical text editor, users familiar with Windows notepad should not encounter difficulties to use it.
Request | Command |
To quit | close the window by clicking on the cross top right corner |
Save file | Press <CTRL-S> |
...
‘nano’ text editor
‘nano’ is a basic text editor, very simple to use and displaying available commands at the bottom of the screen. For example, to leave ‘nano’ , use ^X (press CTRL + X)
How to setup ‘ssh’ trusts between Linux and Tru64
Info | ||
---|---|---|
| ||
|
...
- Generate the key
→ Do not specify a passphrase |
- Copy the linuxhost.pub file, or use copy/paste, in the /.ssh2 folder on the Tru64 host
- Define the authorization file:
|
...
- Initialize the first ssh connection (answer '
yes
' to confirm)
...
If an error occurs, you can check and clean the /root/.ssh/known_host
file on the Linux host
How to setup ‘ssh’ trusts between Linux and VMS
Info | ||
---|---|---|
| ||
|
Enable SSH on the VMS server:
VMS$ SET DEF SYS$LOGIN
VMS$ @TCPIP$CONFIG
...
- Copy the generated file
/root/.ssh/linuxserver.pub
(or use copy/paste between putty session for example) to the VMS system in theSYS$SYSROOT:[SYSMGR.SSH2
] directory
If this folder does not exist, create it using the following command:$ CREATE /DIRECTORY SYS$SYSROOT:[SYSMGR.SSH2]
...
On the VMS system add the Linux server key to the authorized keys:
VMS$ SET DEF SYS$SYSLOGIN
VMS$ SET DEF SYS$SYSROOT:[.SSH2]
VMS$ OPEN/WRITE TMP AUTHORIZATION.
If the file already exists, use
/APPEND
instead of/WRITE
VMS$ WRITE TMP "KEY LINUXSERVER.PUB"
VMS$ CLOSE TMP
Do not forget the dot at the end of the authorization file name
...
Perform some tests (examples)
Charon server name "charon", vms system name "pluto":charon# ssh system@pluto "show system /noproc"
OpenVMS V7.3-2 on node PLUTO 27-SEP-2013 11:50:14.37 Uptime 0 19:20:07
Div | ||||
---|---|---|---|---|
| ||||
Shutdown guests with Expect tool
Introduction
In case SSH cannot be used to perform clean shutdown of the guests, the "expect"
tool can be used to connect to the console, perform the login operation and execute the shutdown command depending on the console status (at login prompt, shell prompt or SRM prompt)
...
Warning |
---|
Console locked: Any active session to the console must be killed before the " For example, if you are connected via " If the console is locked from another host (if you use |
...
This script can handle the following situations:
- No user connected on the console:
- Expect: "
Username:
" (VMS) or "login:
" (Tru64) - Action: An interactive session will be initiated based on <user> and <password> provided in the parameters
- Expect: "
- A user is connected on the console:
- Expect: <prompt> provided in the parameters
- This user must have privileges to perform shutdown as no logout will be issued
- Action: Depending on the Operating system parameter (see <opsys> below), the shutdown command will be sent
- Console is at SRM prompt:
- Expect: ‘
>>>
’ (so works with VAX and Alpha with "P00>>>
") - Action: A '
power off
' command will be issued. If the command is not recognized, the F6 key will be sent (this must be enabled within the configuration file). If the F6 key did not stop the emulator, the script will exit with error code 9 meaning you will have to kill the emulator process yourself (see examples in the "/opt/charon/utils/charon_gstart.stop.example
" file)
- Expect: ‘
Div | ||
---|---|---|
| ||
| ||
Script usage
Usage:
# path/script <port> <user> <password> <prompt> <opsys>
Parameters:
Parameter | Description |
---|---|
<port> | telnet port number (example: 10003) |
<user> | username for login (must be able to perform shutdown) |
<password> | password |
<prompt> | shell prompt (including end space) or last characters of the prompt |
<opsys> | VMS or UNIX |
Example:
Examples are given in the /opt/charon/utils/charon_gstart.stop.example
file
Include Page | ||||
---|---|---|---|---|
|