The text of a manual · part 35 of 49
Cyclades-TS User Guide: Appendix A - New User Background Information, pages 334 to 342
Pages 334 to 342 of 454, from Cyclades-TS User Guide
The original document is the PDF (4.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Cyclades TS2000 and Avocent TS2000
Page 334
Appendix A - New User Background Information The Session Channel Break Extension This is a new feature for the AlterPath Console Server version 2.1.3 and Cyclades-TS version 1.3.7. The Cyclades-TS provides new way to send a break signal during a SSH version 2 terminal session. This method is defined by “Session Channel Break Extension : draft-ietf-secshbreak-00.txt.” In previous Cyclades-TS versions there is one break lenght in milliseconds (break duration). Now the Cyclades-TS have a new parameter <all/Sx>.break_interval, which is used with all.break_sequence (<all/Sxx>.break_sequence). (This improves the SSH-break Cyclades implementation). The ssh2-client receives a command ("<ssh escape char>B") from the user and sends one "break request" to ssh-server. The ssh-server receives the "break request" and sends a break command to the serial port. The ssh client can send the break duration (break interval), so the user can configure this value by command line (" -B <break interval in miliseconds> ") or by ssh_config file ("breakinterval <break interval in miliseconds>").
How it works in SSH Server (all.protocol is socket_ssh) The serial driver accepts the parameter break interval in the break command. If the version is 2 (ssh-2), the server accepts and treats the "break request" sent by the client. The "break request" defines the break-length in miliseconds. The server sends a break command with the break-length to the serial driver to perform the break in the serial port. If the parameter all.break_sequence is configured and the server finds the sequence in the data received from client, the server sends a break command with all.break_interval to serial driver.
How it works in SSH Client The SSH client has a new option "-B <break_interval in miliseconds>" and accepts break_interval in ssh_config. When the user types "<ssh-escape>B" (where ssh-escape is "~") the client sends a "break request" to ssh-server. When the Cyclades-TS calls the ssh-client automatically, it uses the parameter all.break_interval to calls the ssh-2 client.
Configuring sshd’s client authentication using SSH Protocol version 1 Step 1: Only RhostsAuthentication yes in sshd_config. In the linux host enable in the file /etc/ssh/ssh_config the parameters: Host * RhostsAuthentication yes
334
Cyclades-TS
Page 335
Appendix A - New User Background Information UsePrivilegedPort yes • One of these: hostname or ipaddress in /etc/hosts.equiv or /etc/ssh/shosts.equiv hostname or ipaddress and username in ~/.rhosts or ~/.shosts and IgnoreRhosts no in sshd_config • Client start-up command: ssh -t <TS_ip or Serial_port_ip> (if the ssh client is running under a session belonging to a username present both in the workstation’s database and the TS’s database). • Client start-up command: ssh -t -l <username> <TS_ip or Serial_port_ip> (if the ssh client is running under a session belonging to a username present only in the workstation’s database. In this case, the <username> indicated would have to be a username present in the TS’s database).
Note: For security reasons, some ssh clients do not allow just this type of authentication. To access the serial port, the TS must be configured for local authentication. No root user should be used as username.
Step 2: Only RhostsRSAAuthentication yes in sshd_config. • One of the RhostsAuthentication settings, described in Step 1. • Client machine’s host key ($ETC/ssh_host_key.pub) copied into the T/tmp/known_hosts file. The client hostname plus the information inside this file must be appended in one single line inside the file /etc/ssh/ ssh_known_hosts or ~/.ssh/known_hosts and IgnoreUserKnownHosts no inside sshd_config. The following commands can be used for example: echo ‘n ‘client_hostname ‘ >> /etc/ssh/ssh_known_hosts or ~/.ssh/ known_hosts cat /tmp/known_hosts >> /etc/ssh/ssh_known_hosts or ~/.ssh/ known_hosts • client start-up command: ssh -t <TS_ip or Serial_port_ip>
User Guide
335
Page 336
Appendix A - New User Background Information Note: “client_hostname” should be the DNS name. To access the serial port, the TS must be configured for local authentication. No root user should be used as username.
Step 3: Only RSAAuthentication yes in sshd_config. • Removal of the TS’s *.equiv, ~/.?hosts, and *known_hosts files. • Client identity created by ssh-keygen and its public part (~/.ssh/identity.pub) copied into TS’s ~/.ssh/authorized_keys. • Client start-up command: ssh -t <TS_ip or Serial_port_ip>. Step 4: Only PasswdAuthentication yes in sshd_config. • Removal of the TS’s *.equiv, ~/.?hosts, *known_hosts, and *authorized_keys files. • Client startup command: ssh –t -l <username> <TS_ip or Serial_port_ip> or ssh –t –l <username:alias><TS_ip>.
Configuring sshd’s client authentication using SSH Protocol version 2 Only PasswdAuthentication yes in sshd_config DSA Authentication is the default. (Make sure the parameter PubkeyAuthentication is enabled.) •
Client DSA identity created by ssh-keygen -d and its public part (~/.ssh/id_dsa.pub) copied into the TS’s ~/.ssh/authorized_keys2 file.
•
Password Authentication is performed if DSA key is not known to the TS. Client start-up command: ssh -2 -t <TS_ip or Serial_port_ip>.
Note: All files “~/*” or “~/.ssh/*” must be owned by the user and readable only by others. All files created or updated must have their full path and file name inside the file config_files and the command saveconf must be executed before rebooting the TS.
336
Cyclades-TS
Page 337
Appendix A - New User Background Information Configuring the Session Channel Break Extension in SSH Server Step 1: Configure the parameter break_interval in pslave.conf. This can be done by the admin using the Web, snmpset, the Wizard or CLI. Step 2: Configure the parameter ssh_interval in ssh_config. This can be done using the vi editor.
The Process Table The process table shows which processes are running. Type ps -a to see a table similar to that below. Table 21: Process table PID
UID
State
Command
1 root
S
/sbin/inetd
31 root
S
/sbin/sshd
32 root
S
/sbin/cy_ras
36 root
S
/sbin/cy_wdt_led wdt led
154 root
R
/ps -a
To restart the cy_ras process use its process ID or execute the command: signal_ras hup This executes the ps command, searches for the cy_ras process id, then sends the signal hup to the process, all in one step. Never kill cy_ras with the signals -9 or SIGKILL.
User Guide
337
Page 338
Appendix A - New User Background Information TS Menu Script The ts_menu script can be used to avoid typing long telnet or ssh commands. It presents a short menu with the names of the servers connected to the serial ports of the Cyclades-TS. The server is selected by its corresponding number. ts_menu must be executed from a local session: via console, telnet, ssh, dumb terminal connected to a serial port, etc. Only ports configured for console access (protocols socket_server or socket_ssh) will be presented. To start having familiarity with this application, run ts_menu - h: The meaning of each argument is: •
-u<user> - Invokes ts_menu as the user named by <user>. This requires a password to be entered.
•
-l[c] - Generates a list of all ports that the user has access to and terminates. Port aliases will be presented if defined. For the remote ports (clustering) if port alias is not defined they will be shown as "ip_addr:port" (ip_addr referring to the slave ACS). The default is displaying ports in alphabetical order, but in case "c" flag is also specified the listing will be sorted by console server (master unit showing first).
•
-ro - Invokes ts_menu in read only mode. It works even if the user is the only one logged to a certain port. In this mode, the user can connect to any port he has access to but cannot type in. He is in sniff mode. A message stating "Read only mode" is provided in case the user attempts to interact with that port. Note however that a real sniff session (the user isn't the first one to log to a certain port) is only allowed if he is authorized to.
•
-s - Invokes ts_menu in a way that all ports (including slave ACSs) are presented in a single list sorted in alphabetical order. Not using this option causes the display to be as for the old implementation.
•
-auth - For backward compatibility, this option makes the new ts_menu implementation behave as the old one so that authentication is performed again to access each port.
•
<console port> - If issued, produces a direct connection to that port. In the case the user doesn't have access to that port or the port doesn't exist, the application returns a "console not found" message and terminates. <console port> can be the port alias or the port number. In case of clustering, port number must include a reference to the slave ACS as "host:port" (where host is the slave hostname or IP address).
338
Cyclades-TS
Page 339
Appendix A - New User Background Information Other options: •
-p - Display Tcp port
•
-i - Display Local Ip assigned to the serial port
•
-u <name> - Username to be used in ssh/telnet command
•
-U - Always ask for an username
•
-e <[^]char> - Escape char used by telnet or ssh
Example: > ts_menu Master and Slaves Console Server Connection Menu 1 TSJen800 2 edson-r4.Cyclades.com 3 az84.Cycladess.com 4 64.186.190.85 5 az85.Cyclades.com Type 'q' to quit, a valid option [1-5], or anything else to refresh: By selecting 1 in this example, the user will access the local serial ports on that Cyclades-TS. If the user selects 2 through 5, remote serial ports will be accessed. This is used when there is clustering (one Cyclades-TS master box and one or more Cyclades-TS slave boxes). If the user selects 1, the following screen is displayed: Serial Console Server Connection Menu for your Master Terminal Server 1 ttyS1 2 ttyS2 3 s3serverfarm Type 'q' to quit, 'b' to return to previous menu, a valid option[13], or anything else to refresh:
User Guide
339
Page 340
Appendix A - New User Background Information Options 1 to 3 in this case are serial ports configured to work as a CAS profile. Serial port 3 is presented as an alias name (s3serverfarm). When no name is configured in pslave.conf, ttyS<N> is used instead. Once the serial port is selected, the username and password for that port (in case there is a per-user access to the port and -U is passed as parameter) will be presented, and access is granted. To access remote serial ports, the presentation will follow a similar approach to the one used for local serial ports. The ts_menu script has the following line options: -p : Displays Ethernet IP Address and TCP port instead of server names. Cyclades-TS: Serial Console Server Connection menu 1 209.81.55.79 7001 2 209.81.55.79 7002 3 209.81.55.79 7003 4 209.81.55.79 7004 5 209.81.55.79 7005 6 209.81.55.79 7006 Type 'q' to quit, a valid option [1-6], or anything else to refresh : -i : Displays Local IP assigned to the serial port instead of server names. Cyclades-TS: Serial Console Server Connection menu 1 192.168.1.101 2 192.168.1.102 3 192.168.1.103 4 192.168.1.104 5 192.168.1.105 6 192.168.1.106 Type 'q' to quit, a valid option [1-6], or anything else to refresh : -u <name> : Username to be used in the ssh/telnet command. The default username is that used to log onto the Cyclades-TS. -h : Lists script options.
340
Cyclades-TS
Page 341
Appendix A - New User Background Information
User Guide
341
Page 342
Appendix A - New User Background Information
User Guide
342