-
1
- #1
Since Procomm does not support SSH, and more and more systems have telnet disabled for security reasons. I wanted to find a way to use ssh with Procomm. I've looked at several other terminal emulation programs that support ssh, but none have the extensive scripting the Procomm has. To be able to use Procomm and ssh, I had to telnet to a server, then ssh from that server as needed.
However, I wanted to be able to telnet to my local PC (localhost) and then ssh out, so I would not have to telnet to another server first. I tried several options, including the built in Windows telnet server, but encountered problems.
Searching the internet I found several references to uwin and Cygwin, which are windows applications that enable unix commands on your PC. I finally got my PC set up with Cygwin and now I can open Procomm, telnet to myself at localhost and then ssh out to a server. This allows me to use my Aspect scripts with an ssh connection.
Below are the steps to install and configure Cygwin on your PC to enable you to ssh to a remote server using Procomm.
I've done this on several Windows 7 PCs and I think it should work for XP also, although I have not tested it on XP.
1. Install cygwin from Select the appropriate installer for your
version of windows 7 (32 or 64 bit). The base install of Cygwin only includes
the basic Cygwin packages.
Install with the following options, adjust as required for your individual system.
a. Install from Internet
b. Default directory c:\Cygwin64 (for 64 bit install)
c. Install for all users
d. Local Packages Directory. Note: This is the directory on your PC where
the Cygwin packages are downloaded to during the install process. This
directory can be deleted after the install is complete.
e. Select the internet connection, direct or proxy as appropriate
f. Select a Cygwin download site.
Cygwin will start downloading the install files, then a “Select Packages” screen
will display. All of the base packages will be selected by default. You will need
to select the following optional packages.
Note: To select the packages below, expand the section name, then click on
“skip” on the row that lists the package. This will toggle the check box in the
binary column for that package.
g. Net section.
i. inetutils
ii. inetutils-server
iii. openssh
iv. openssl
v. tcp-wrappers
h. Shells section.
i. zsh
i. System section.
i. util-linux
j. On the Resolving Dependencies screen, check “Select Required Packages”
This will automatically install any additional packages, such as library files
that are required to run the optional packages selected above.
2. Cygwin setup.
Once the Cygwin install is completed, from the start menu, right click on the
Cygwin terminal icon and select “run as administrator” to get the Cygwin prompt.
3. Setup the internet utilities files using the iu-config command.
Enter the following command.
/usr/bin/iu-config
Note: If you are prompted to setup the inetd super service, answer “no”
4. Edit the /etc/inetd.conf file and enable telnet by removing the # at the
beginning of the following line.
telnet stream tcp nowait root /usr/sbin/tcpd telnetd
5. Edit the /etc/xinetd.d/telnet file and change the line that has “disable = yes”
to “disable =no”. (line in bold below)
# default: on
# description: The telnet server serves telnet sessions; it uses # unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE NAMEINARGS IPv4
socket_type = stream
wait = no
server = /usr/sbin/tcpd
server_args = /usr/sbin/telnetd
log_on_failure += USERID
user = cyg_server
}
6. Edit the /etc/passwd file and change the last field on the line with your
Windows username from /bin/bash to /usr/bin/zsh
Note: if your Windows username does not exist in the /etc/passwd file, or the
/etc/passwd does not exist, create the file with the mkpasswd command.
mkpasswd -l >/etc/passwd
Note: The default Cygwin shell is “bash”. However, the bash shell may not
display the terminal screen properly once you are connected to a remote host
using ssh. In addition, other commands such as vi, cat and may not correctly
display text when using the bash shell.
7. Edit the /etc/hosts.allow file and add the appropriate entries for your
network. The default values only allow connections from the localhost and
are probably appropriate for most users.
Default hosts.allow file.
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# CYGWIN note: if you use a software firewall (such
# as ZoneAlarm or the "Windows Firewall" in Windows
# XP), you must also open a 'hole' at the proper
# port for the services you enable below.
#
ALL : localhost 127.0.0.1/32 [::1]/128 [::ffff:127.0.0.1]/128 : allow
ALL : PARANOID : deny
sshd: ALL : allow
8. Edit the /etc/hosts.deny file and add the appropriate entries for your
network. The default values are probably appropriate for most users.
Default hosts.deny file.
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL:ALL EXCEPT localhostENY
Note: The hosts.allow file will only allow the localhost to connect and enter a
valid user name and password. Other systems can connect and get a login
prompt, however, if they enter a valid login and password, the system will
immediately close the connection once remote IP address is determined.
9. Configure the inetd to run as a service. Commands are explained in
/usr/share/doc/inetutils/inetutils.OLD-README.
Enter the following commands.
a. cygrunsrv -I inetd -d 'Cygwin Inetd' -p /usr/sbin/inetd -a '-d' -e CYGWIN="tty ntsec"
b. cygrunsrv -S inetd
10. Enter the following to stop, then start the inetd service
a. net stop inetd
b. net start inetd
11. Verify that the Cygwin Inetd service is set to start automatically when
Windows starts on your PC.
a. Right click on My computer and select “manage” Then select services in
the “Services and Applications” folder
b. Scroll down to “Cygwin Inetd” Verify that the startup type is “Automatic”.
c. If the startup type is not “Automatic”, right click on Cygwin Inetd and
select Properties. In the startup type select “automatic”, then click OK.
Note: This option will start the Cygwin Inetd services when Windows
starts. If you don’t want to start the service automatically, and prefer to
start it manually, select “Manual” Then, when you need the Cygwin telnet
service, return to the Computer Management screen, select Cygwin Inetd
and select “Start Service”.
12. On the start menu, open a second Cygwin terminal window.
Note: Do not close the existing Cygwin terminal window, if the second
window fails to open, or errors are displayed, you can correct the problems
using the first Cygwin terminal window.
If the terminal window opens successfully, and you have properly
configured the Windows user to use the z shell, the zsh configuration
utility will open. Select the options that you prefer, such as the history
file and the editor options, then save the selections.
11. Run the ssh user config command to configure the ssh keys.
Enter the following command.
ssh-user-config
For most configurations the following answers are appropriate, adjust as
required for your configuration.
a. “yes” to the “create a SSH2 RSA and DSA identity file.
b. Press the “enter” key at “Enter passphrase” to create a empty passphrase
c. “No” to the “do you want to use this identity to login to this machine”
d. “No” to the “create a deprecated SSH1 RSA identity”
12. Test the telnet connection to the localhost
Enter the following command.
a. telnet localhost
b. Enter your Windows username and password at the login and
password prompts.
c. SSH to a remote server the requires ssh to verify the ssh
connectivity.
13. To use ProComm Plus telnet to connect via ssh to a remote server.
a. Open the Cygwin terminal window.
b. Open ProComm Plus and manually connect to “localhost”
c. At the login prompt, enter your windows username and password.
You now have a ProComm telnet connection to the Cygwin server running on
your PC. To connect to a remote host via ssh enter the appropriate ssh
command, such as “ssh 10.11.12.13”. Because you opened the connection using
ProComm telnet you will be able to use your Aspect scripts, scroll back screens
etc. just as if you had opened a telnet connection.
Notes:
1. To create a Cygwin dialing directory entry, enter “localhost” in the Host/IP
address field of the dialing directory entry.
2. When using VI to edit a file on a remote host, the left, right, up and down
arrows on the key board do not always work correctly. However, the VI
command keys h,l,j and k to move the cursor worked without any problems.
3. Once you establish a telnet connection to the local host, the Cygwin terminal
window can be closed.
4. If the ProComm telnet connection hangs after you enter your Windows
username and password, close the connection and open the Cygwin terminal
window then open the ProComm telnet session again.
5. If the text on the terminal is not wrapping correctly or is not aligned
correctly, add the following lines to the end of the .zshrc file.
a. TERM=vt100
b. stty cols 132
c. stty rows 48
However, I wanted to be able to telnet to my local PC (localhost) and then ssh out, so I would not have to telnet to another server first. I tried several options, including the built in Windows telnet server, but encountered problems.
Searching the internet I found several references to uwin and Cygwin, which are windows applications that enable unix commands on your PC. I finally got my PC set up with Cygwin and now I can open Procomm, telnet to myself at localhost and then ssh out to a server. This allows me to use my Aspect scripts with an ssh connection.
Below are the steps to install and configure Cygwin on your PC to enable you to ssh to a remote server using Procomm.
I've done this on several Windows 7 PCs and I think it should work for XP also, although I have not tested it on XP.
1. Install cygwin from Select the appropriate installer for your
version of windows 7 (32 or 64 bit). The base install of Cygwin only includes
the basic Cygwin packages.
Install with the following options, adjust as required for your individual system.
a. Install from Internet
b. Default directory c:\Cygwin64 (for 64 bit install)
c. Install for all users
d. Local Packages Directory. Note: This is the directory on your PC where
the Cygwin packages are downloaded to during the install process. This
directory can be deleted after the install is complete.
e. Select the internet connection, direct or proxy as appropriate
f. Select a Cygwin download site.
Cygwin will start downloading the install files, then a “Select Packages” screen
will display. All of the base packages will be selected by default. You will need
to select the following optional packages.
Note: To select the packages below, expand the section name, then click on
“skip” on the row that lists the package. This will toggle the check box in the
binary column for that package.
g. Net section.
i. inetutils
ii. inetutils-server
iii. openssh
iv. openssl
v. tcp-wrappers
h. Shells section.
i. zsh
i. System section.
i. util-linux
j. On the Resolving Dependencies screen, check “Select Required Packages”
This will automatically install any additional packages, such as library files
that are required to run the optional packages selected above.
2. Cygwin setup.
Once the Cygwin install is completed, from the start menu, right click on the
Cygwin terminal icon and select “run as administrator” to get the Cygwin prompt.
3. Setup the internet utilities files using the iu-config command.
Enter the following command.
/usr/bin/iu-config
Note: If you are prompted to setup the inetd super service, answer “no”
4. Edit the /etc/inetd.conf file and enable telnet by removing the # at the
beginning of the following line.
telnet stream tcp nowait root /usr/sbin/tcpd telnetd
5. Edit the /etc/xinetd.d/telnet file and change the line that has “disable = yes”
to “disable =no”. (line in bold below)
# default: on
# description: The telnet server serves telnet sessions; it uses # unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE NAMEINARGS IPv4
socket_type = stream
wait = no
server = /usr/sbin/tcpd
server_args = /usr/sbin/telnetd
log_on_failure += USERID
user = cyg_server
}
6. Edit the /etc/passwd file and change the last field on the line with your
Windows username from /bin/bash to /usr/bin/zsh
Note: if your Windows username does not exist in the /etc/passwd file, or the
/etc/passwd does not exist, create the file with the mkpasswd command.
mkpasswd -l >/etc/passwd
Note: The default Cygwin shell is “bash”. However, the bash shell may not
display the terminal screen properly once you are connected to a remote host
using ssh. In addition, other commands such as vi, cat and may not correctly
display text when using the bash shell.
7. Edit the /etc/hosts.allow file and add the appropriate entries for your
network. The default values only allow connections from the localhost and
are probably appropriate for most users.
Default hosts.allow file.
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# CYGWIN note: if you use a software firewall (such
# as ZoneAlarm or the "Windows Firewall" in Windows
# XP), you must also open a 'hole' at the proper
# port for the services you enable below.
#
ALL : localhost 127.0.0.1/32 [::1]/128 [::ffff:127.0.0.1]/128 : allow
ALL : PARANOID : deny
sshd: ALL : allow
8. Edit the /etc/hosts.deny file and add the appropriate entries for your
network. The default values are probably appropriate for most users.
Default hosts.deny file.
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL:ALL EXCEPT localhostENY
Note: The hosts.allow file will only allow the localhost to connect and enter a
valid user name and password. Other systems can connect and get a login
prompt, however, if they enter a valid login and password, the system will
immediately close the connection once remote IP address is determined.
9. Configure the inetd to run as a service. Commands are explained in
/usr/share/doc/inetutils/inetutils.OLD-README.
Enter the following commands.
a. cygrunsrv -I inetd -d 'Cygwin Inetd' -p /usr/sbin/inetd -a '-d' -e CYGWIN="tty ntsec"
b. cygrunsrv -S inetd
10. Enter the following to stop, then start the inetd service
a. net stop inetd
b. net start inetd
11. Verify that the Cygwin Inetd service is set to start automatically when
Windows starts on your PC.
a. Right click on My computer and select “manage” Then select services in
the “Services and Applications” folder
b. Scroll down to “Cygwin Inetd” Verify that the startup type is “Automatic”.
c. If the startup type is not “Automatic”, right click on Cygwin Inetd and
select Properties. In the startup type select “automatic”, then click OK.
Note: This option will start the Cygwin Inetd services when Windows
starts. If you don’t want to start the service automatically, and prefer to
start it manually, select “Manual” Then, when you need the Cygwin telnet
service, return to the Computer Management screen, select Cygwin Inetd
and select “Start Service”.
12. On the start menu, open a second Cygwin terminal window.
Note: Do not close the existing Cygwin terminal window, if the second
window fails to open, or errors are displayed, you can correct the problems
using the first Cygwin terminal window.
If the terminal window opens successfully, and you have properly
configured the Windows user to use the z shell, the zsh configuration
utility will open. Select the options that you prefer, such as the history
file and the editor options, then save the selections.
11. Run the ssh user config command to configure the ssh keys.
Enter the following command.
ssh-user-config
For most configurations the following answers are appropriate, adjust as
required for your configuration.
a. “yes” to the “create a SSH2 RSA and DSA identity file.
b. Press the “enter” key at “Enter passphrase” to create a empty passphrase
c. “No” to the “do you want to use this identity to login to this machine”
d. “No” to the “create a deprecated SSH1 RSA identity”
12. Test the telnet connection to the localhost
Enter the following command.
a. telnet localhost
b. Enter your Windows username and password at the login and
password prompts.
c. SSH to a remote server the requires ssh to verify the ssh
connectivity.
13. To use ProComm Plus telnet to connect via ssh to a remote server.
a. Open the Cygwin terminal window.
b. Open ProComm Plus and manually connect to “localhost”
c. At the login prompt, enter your windows username and password.
You now have a ProComm telnet connection to the Cygwin server running on
your PC. To connect to a remote host via ssh enter the appropriate ssh
command, such as “ssh 10.11.12.13”. Because you opened the connection using
ProComm telnet you will be able to use your Aspect scripts, scroll back screens
etc. just as if you had opened a telnet connection.
Notes:
1. To create a Cygwin dialing directory entry, enter “localhost” in the Host/IP
address field of the dialing directory entry.
2. When using VI to edit a file on a remote host, the left, right, up and down
arrows on the key board do not always work correctly. However, the VI
command keys h,l,j and k to move the cursor worked without any problems.
3. Once you establish a telnet connection to the local host, the Cygwin terminal
window can be closed.
4. If the ProComm telnet connection hangs after you enter your Windows
username and password, close the connection and open the Cygwin terminal
window then open the ProComm telnet session again.
5. If the text on the terminal is not wrapping correctly or is not aligned
correctly, add the following lines to the end of the .zshrc file.
a. TERM=vt100
b. stty cols 132
c. stty rows 48