Mike's PBX Cookbook

RLOGIN to a CS1K (Mac)

Note: From Rel. 7.5, SSH is the preferred network protocol, and present in macOS. In terminal, type: ssh admin2@<call-server-ip> or ssh pdt2@<call-server-ip>

rlogin is a software utility for Unix-like computer operating systems that allows users to log in on another host via a network, communicating via TCP port 513. It is directly supported by the CS1000,and OS X. No additional software is necessary.

UPDATE: Apple has removed rlogin, telnet, and ftp from macOS as its insecure. To restore it, download ftp_telnet_rlogin.zip, and move the binaries to: /usr/local/bin.

The Call Server will obviously need to be connected to a network, have some PTY's (pseudo TTY's) built, and you'll need to know it's IP address or FQDN (Fully Qualified Domain Name). The first two are probably a given, the third easy to find.

NOTE:

IP Address

Give the Mac an appropriate IP address manually in the Network Preference Pane, and connect it to the ELAN data switch (ELAN because we're connecting to the Call Server). Mac Ethernet ports are Auto-sensing, Auto-negotiating, and Auto-crossover.

OS X Network Preference Pane

Terminal

Open Terminal (Applications/Utilities/Terminal.app), and PING the Call Server. Type Ctrl-c to exit ping.

$ ping 10.10.10.5
PING 10.10.10.5 (10.10.10.5): 56 data bytes
64 bytes from 10.10.10.5: icmp_seq=0 ttl=32 time=5.432 ms
64 bytes from 10.10.10.5: icmp_seq=1 ttl=32 time=4.547 ms
^C
--- 10.10.10.5 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 4.547/4.989/5.432/0.443 ms

If the ping is successful, use RLOGIN CPSID@host to open a PTY session with the Call Server.
Log into the Call server console using the standard LOGI command, ADMIN1/0000.
Enter LOGO to close the session. To close the connection, enter ~. (tilde, period).

$ rlogin CPSID@10.10.10.5

Done!

TTY 03 SCH MTC BUG 9:21
OVL111 IDLE 0
OVL111 TTY 00 117 ADMIN1
>logi admin1
PASS?

WARNING: THE PROGRAMS AND DATA STORED ON THIS SYSTEM ARE LICENSED TO
OR ARE THE PROPERTY OF NT/BNR AND ARE LAWFULLY AVAILABLE ONLY TO
AUTHORIZED USERS FOR APPROVED PURPOSES. UNAUTHORIZED ACCESS TO ANY
PROGRAM OR DATA ON SYSTEM IS NOT PERMITTED. THIS SYSTEM MAY BE
MONITORED AT ANY TIME FOR OPERATIONAL REASONS. THEREFORE, IF YOU
ARE NOT AN AUTHORIZED USER, DO NOT ATTEMPT TO LOGIN.

OVL111 IDLE 0
OVL111 TTY 00 117 ADMIN1
.
TTY #03 LOGGED IN ADMIN1 09:21 1/11/2011

>

Or to access PDT, use RLOGIN PDT@host and enter the PDT password when prompted:

$ rlogin PDT@10.10.10.5

PDT: pdt login on /pty/ptty00.S
Password:
PDT in Progress. Please Wait....

Done!

pdt>

Enter EXIT to close the session. To close the connection, enter ~. (tilde, period).


Automating with AppleScript

Here is a small Applescript you might find useful. It prompts for an IP address or FQDN, pre-forms a simple command string (mentioned above), and opens a terminal window with the command.

If you are interesting in modifying the script, the code is below. Paste it into AppleScript Editor, and save as an Application. If you mainly deal with one CS1000, put its IP address in the empty "default answer" quotes so you don't have to re-type it everytime.

UPDATE: An SSH version for later systems!

CS1000 RLOGIN AppleScript:

set question to display dialog "Enter Host IP Address or FQDN:" default answer "" buttons {"PDT", "CPSID"} default button 2 with title "CS1000 Login"

set mode to (button returned of question)

if (text returned of question) > "" then
	set myhost to mode & "@" & (text returned of question)
	
	tell application "Terminal"
		if (count of windows) is 0 then
			do script "rlogin " & myhost
		else
			do script "rlogin " & myhost in window 1
		end if
		activate
	end tell
	
end if

In the above script, change the command rlogin to ssh, and "CPSID" to "admin2" to use it with the newer systems.

UPDATE: Here is a SSH version of the script, using SSH, with user "admin2" (default) or "pdt2".


CPSID arguments:

You can change the CPSID as follows:

Values may be combined, eg: rlogin CPSID1110@<ip> will login with MTC, SCH and BUG messages on the port.

Secure Shell:

Secure Shell (SSH) is a more secure replacement for telnet and rlogin (which send information, notably passwords, in plaintext).
SSH into a Call Server from Terminal (Rel. 7.5 on) with: ssh admin2@<call-server-ip> or ssh pdt2@<call-server-ip>

If an SSH connection is refused with the following error, we must delete the offending RSA key.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Enter the command: ssh-keygen -R <IP Address> to delete the key, and try again.
(rm -r .ssh also works. This deletes all known hosts, but its easier to type!)