This chapter explains how you can install Cygwin and start the SSH daemon on Microsoft Windows hosts. In particular, this chapter covers the following:
Install Cygwin Cygwin comes with a normal setup.exe to install in Windows, but there are a couple steps you will need to pay attention to, so we will walk you through the installation. To keep the installation small while saving bandwidth for you and Cygwin, the default installer will download only the files you need from the internet. PCRE Regex Filters For Kismet On Backtrack Linux| Question Defense. Skip to content. If you decide to remove the default kismet install on Backtrack Linux so you can then compile kismet from source you will be missing some functionality. One of the bits of functionality not installed by default on Backtrack 5 release 3 is the PCRE Regex.
Note:
This chapter is applicable only for the following cases:When the destination host on which you are installing a Management Agent is running on Microsoft Windows.
When the OMS host from where you are accessing the Add Host Targets Wizard is running on Microsoft Windows.
Overview
When you use the Add Host Targets Wizard to install Oracle Management Agent (Management Agent) on a destination host that is running on Microsoft Windows, as a prerequisite, you are expected to have Cygwin installed and the SSH Daemon started on that destination host.
Similarly, when you use the Add Host Targets Wizard to install from an OMS host that is running on Microsoft Windows, as a prerequisite, you are expected to have Cygwin installed on that source host.
The Add Host Targets Wizard is an application built into the Enterprise Manager Cloud Control console. It offers GUI-rich, interactive screens to enable you to install Management Agents on unmanaged hosts and convert them to managed hosts so that they can be monitored and managed in Enterprise Manager Cloud Control.
Cygwin is essentially a utility that offers a Linux-like environment on a Microsoft Windows operating system. Technically, it is a DLL (cygwin1.dll) that acts as a Linux API layer providing substantial Linux API functionality. Once you install Cygwin, you can configure the SSH Daemon on it.
The SSH Daemon enables the Add Host Targets Wizard to establish an SSH connectivity (Secure Shell) between the destination host and the host running Oracle Management Service (OMS). Using this connectivity, the wizard transfers the software binaries to the destination host over SSH protocol, and installs and configures the Management Agent.
Caution:
Ensure that your password-enabled SSH connection is set up between the host and OMS, and not between destination hosts.In Enterprise Manager Cloud Control, the Add Host Targets Wizard automatically sets up and drops the SSH connectivity. Therefore, all you need to do is, manually install Cygwin on the destination host and start the SSH Daemon on it.
Note:
The Add Host Targets Wizard is certified and supported with Cygwin 1.7.Installing Cygwin
To install Cygwin, follow these steps:
Before starting with the SSHD setup, ensure you are not using OpenSSH and MKSNT when using the Add Host Targets Wizard. The Add Host Targets Wizard uses the complete Cygwin suite (full collection of the software tools packaged in Cygwin).
To get the complete collection of Cygwin, do the following:
Ensure
OpenSSHbin
andmksnt
are not in your PATH environment variable. If they are, remove them by doing the following:Right-click on My Computer and go to Properties.
In the System Properties window, click Advanced.
In this tab, click Environment Variables.
Here, search for the PATH system variable, select it, and if the
OpenSSHbin
andmksnt
are present in the PATH, click Edit.In the Edit System Variable dialog box, delete these two values from the PATH, and click OK.
Stop the SSH Daemon if it is running from
OpenSSH
:Right-click on My Computer, and select Manage.
In the Computer Management window, in the left pane, expand Services and Applications, and select Services.
In the right pane, right-click the SSH daemon service and click Stop.
Note:
Ensure you rename the installation directories ofOpenSSH
andmksnt.
Visit the following Web site, and install the Cygwin software in the
C:cygwin
directory:http://www.cygwin.com
Note:
If you install Cygwin in a different directory on the destination host, then do the following:(a) Ensure that you update the
$<OMS_HOME>/oui/prov/resources/ssPaths_msplats.properties
file with the proper Cygwin binary values after installing the Enterprise Manager system.(b) If the OMS as well as the target is on Microsoft Windows, ensure that Cygwin is installed in the same location on the OMS host.
While installing Cygwin, ensure that you select the following packages in the Select Packages screen:
From the Archive category, select
unzip
andzip
.From the Net category, select
openssh
.Figure 5-2 Net Packages
After you install Cygwin, navigate to the
C:cygwin
directory, open thecygwin.bat
file using the Notepad utility, and edit it to add the following line:set CYGWIN=binmode tty ntsec
Open the Cygwin Bash Shell and verify whether
cygrunsrv
is installed:Note:
If you are prompted to provide a Cygwin value, enterbinmode tty ntsec
. If this returns an error message stating service does not exist, you are on the right track, and can proceed to the next step.Open a new command prompt and run the following:
Note:
Enter no when prompted to create sshd user account (message reads sshd user account needs to be created).Enter yes for all other prompts.
When prompted to answer the question Which value should the environment variable CYGWIN have when sshd starts?, Oracle recommends that you set the value to at least ntsec as shown in the following example. This will enable you to change the user context without having to specify the password.
As an answer to the previously mentioned question, specify a value that is similar to the following and press Enter:
Now, open the
/etc/passwd
file, and remove only those entries of the user that you will use to connect to the OMS machine.For example,
If the user that you are employing to connect to the OMS machine is a local user, execute the following:
If the user you are employing to connect to the OMS machine is a domain user, execute the following:
Start the SSH daemon.
If the user you are employing to connect to the OMS machine is a domain user, do the following:
Right-click on My Computer, and select Manage.
In the Computer Management dialog box that appears, go to Services and Applications, and select CYGWIN sshd.
Right-click CYGWIN sshd and select Properties.
In the Properties dialog box, go to the Log On tab.
Here, specify the domain/user name and password. Click Apply.
Change the permission of
/etc/ssh_host_rsa_key
. It is recommended that you do not allow private key files to be accessible by others.Now, go to the CYGWIN command prompt, and execute the following:
Note:
If/var/log/sshd.log
does not exist, you do not have to execute the following command:Start the SSH daemon by executing:
Alternatively, from the same BASH prompt, you can also execute:
Note:
Usecygrunsrv -E sshd
to stop the SSH daemon.
You can now test your
cygwin
setup.To do this, go to a different machine (that has the
ssh
client running), and execute the following command:For example,
This command will prompt you to specify the password. When you specify the correct password, the command should return the accurate date.
Setting Up the Timezone Variable on Remote Hosts
To verify if the timezone environment variable (TZ
) is accessible by the SSH server on the remote hosts, execute the following command from the OMS host:
If this command does not return the TZ
environment variable value, you must set the TZ
variable and ensure this is accessible by the SSH server. You can set the TZ
environment variable on remote hosts in the following sections:
Set the TZ variable and Restart the SSH Daemon
If the shell being used is BASH, add the following line to the .bashrc
file in the home directory of the user (being used) for ssh
access:
If you are using a CSH shell, then add the following line to the .cshrc
file in that directory:
Depending on the shell that is present on the host, set the TZ variable by running the following command. In the following command,
PST8PDT
is only an example.Restart the SSH daemon by executing:
Now, execute the following command from the OMS home to verify if the SSH server can access the TZ variable.
Set the TZ Variable in the 'Shell rc' File
The timezone variable must be set in the rc
file of the shell that the host is using.
For example, if the host is using a BASH shell, go to the user's home directory ($HOME
) and add the following to the ~/.bashrc
file to set the TZ variable:
Install Kismet Cygwin
If the host is using a CSH shell, go to $HOME
and add the following to the ~/.cshrc
file:
Download Cygwin
Now, execute the following command from the OMS home to verify if the SSH server can access the TZ variable.