Best Domain to Download Cygwin From
11/28
5 Installing Cygwin and Starting the SSH Daemon
This chapter explains how to install Cygwin and start the SSH daemon on Microsoft Windows hosts. This chapter is applicable only when you want to install a Management Amanuensis on a Microsoft Windows host, using the Add Host Targets Magician or EM CLI. In particular, this chapter covers the post-obit:
-
About the Cygwin Requirement for Installing Direction Agents
-
Before You Begin Installing Cygwin
-
Installing Cygwin
-
Configuring SSH
-
Afterward Installing Cygwin and Configuring SSH
Of import:
If you exercise not want to install Cygwin to deploy Management Agents on Microsoft Windows hosts using the Add together Host Targets Wizard or EM CLI, y'all can cull to deploy Management Agents on these hosts using the PsExec process utility. For information on how to deploy Direction Agents on Microsoft Windows hosts using PsExec, run across Appendix F.
5.one About the Cygwin Requirement for Installing Direction Agents
The Add Host Targets Sorcerer is an application built into the Enterprise Manager Deject Command console. Information technology offers GUI-rich, interactive screens that enable you to install Oracle Management Agents (Direction Agents) on unmanaged hosts and convert them to managed hosts, and then that they tin can exist monitored and managed in Enterprise Manager Deject Control.
When you use the Add together Host Targets Wizard or EM CLI to install a Management Agent on a host running on Microsoft Windows, as a prerequisite, you must install Cygwin and start the SSH Daemon on the host. To do so, follow the steps listed in Section 5.3.
Cygwin is essentially a utility that offers a Linux-similar environment on a Microsoft Windows host. Technically, it is a DLL (cygwin1.dll
) that acts as a Linux API layer providing substantial Linux API functionality. In one case you install Cygwin, yous can configure the SSH Daemon on the host. The Add together Host Targets Wizard is certified and supported with Cygwin 1.7.
The SSH Daemon enables the Add together Host Targets Wizard to institute SSH connectivity between the OMS host and the host on which you want to install a Management Agent. Using this connectivity, the wizard transfers the Management Agent software binaries to the destination host over SSH protocol, installs the Management Agent, and configures it.
5.2 Earlier Y'all Brainstorm Installing Cygwin
Earlier starting with the SSHD setup, ensure you are not using OpenSSH and MKSNT when using the Add Host Targets Wizard. To do so, perform the following checks:
-
Ensure
OpenSSH\bin
andmksnt
are non in yourPATH
surroundings variable. If they are, remove them by doing the post-obit:-
Right-click on My Reckoner and become to Properties.
-
In the System Properties window, click Advanced.
-
In this tab, click Surround Variables.
-
Here, search for the
PATH
system variable, select information technology, and if theOpenSSH\bin
andmksnt
are present inPATH,
click Edit. -
In the Edit Organization Variable dialog box, delete these two values from
PATH,
and so click OK.
-
-
Finish the SSH Daemon if it is running from
OpenSSH
,MKS
or whatsoever other vendor. If the SSH Daemon is running, end it by doing the following:-
Right-click on My Computer, and select Manage.
-
In the Figurer Management window, in the left pane, expand Services and Applications, and select Services.
-
In the right pane, click the SSH Daemon/MKS Secure Shell service, then click the Stop button.
-
Note:
The navigational steps described in this section may vary for different Microsoft Windows operating systems.
5.iii Installing Cygwin
To install Cygwin on a Microsoft Windows host, follow these steps:
-
Access the following URL, then click Install Cygwin:
http://www.cygwin.com/
-
Download the 32-bit version (if you are running a 32-chip version of Microsoft Windows) or the 64-bit version (if you are running a 64-bit version of Microsoft Windows) of the Cygwin setup executable.
-
Run the setup executable, then click Next to proceed.
-
On the Cull Installation Type screen, select Install from Net, then click Adjacent.
-
On the Choose Installation Directory screen, enter C:\cygwin as the Root Directory, then click Next.
Annotation:
If you choose to install Cygwin in a different directory, then ensure that you update the
SSH_PATH, SCP_PATH, MKDIR_PATH, SH_PATH, CHMOD_PATH
, andTRUE
backdrop present in the$<OMS_HOME>\oui\prov\resources\ssPaths_msplats.properties
file to their proper Cygwin binary values, after installing the Enterprise Manager organisation.For example, if y'all choose to install Cygwin in the
D:\software\cygwin
directory, then update the specified backdrop in the post-obit manner:SCP_PATH=D:\software\cygwin\bin\scp.exe SH_PATH=D:\software\cygwin\bin\sh.exe CHMOD_PATH=D:\software\cygwin\bin\chmod.exe LS_PATH=D:\software\cygwin\bin\ls.exe
-
On the Select Local Package Directory screen, select a directory on your local motorcar where you desire to store the downloaded installation files, then click Next.
-
On the Select Connectedness Type screen, select appropriate settings to connect to the internet, then click Side by side.
-
On the Cull Download Site(s) screen, select whatever site from the available listing, and so click Next.
-
On the select packages screen, ensure that you select the following packages, and so click Next:
From the Archive category, select
unzip
andnull
equally follows:From the Cyberspace category, select
openssh
andopenssl
every bit follows:After selecting the packages and clicking Next, the Resolving Dependencies screen is displayed. Click Next to proceed.
-
On the Installation Condition and Create Icons screen, do non make any changes. Click Stop to complete the installation procedure.
five.4 Configuring SSH
This section describes how to configure SSH and test your Cygwin setup afterwards installing Cygwin on a host.
Note:
While configuring SSH, y'all may need to run the cygwin.bat
script. While running cygwin.bat
in Microsoft Windows Server 2008 and Microsoft Windows Vista, ensure that you invoke information technology in administrator mode. To do this, right-click the cygwin.bat
file and select Run every bit administrator.
To configure SSH and examination your Cygwin setup, follow these steps:
-
After y'all install Cygwin, navigate to the
C:\cygwin
directory, open up theCygwin.bat
file in edit mode using whatsoever editor, and add the following line before invoking the bash vanquish.set CYGWIN=binmode ntsec
For example, here are the contents for the
Cygwin.bat
file after adding the higher up line:@echo off C: chdir C:\cygwin\bin set CYGWIN=binmode ntsec bash --login -i
-
To verify if Cygwin (
cygrunsrv)
is installed properly, runC:\cygwin\Cygwin.bat
, and execute the following command:cygrunsrv -h
If Cygwin is installed properly, and then all the Cygwin help options are displayed on the screen. However, if this control returns an mistake message, then you may accept to reinstall Cygwin.
-
To configure the SSHD service, run
C:\cygwin\Cygwin.bat
, and execute the following command:ssh-host-config
Afterwards running the command, yous are prompted the post-obit questions:
*** Query: Should privilege separation exist used? <aye/no>: yeah *** Query: New local business relationship 'sshd'? <aye/no>: yes *** Query: Do y'all desire to install sshd as a service? *** Query: <Say "no" if information technology is already installed as a service> <yep/no>: yes *** Query: Enter the value of CYGWIN for the deamon: [] binmode ntsec *** Query: Do you desire to utilise a different name? (yeah/no) yes/no
At this point, if you want to use the same name, that is
cyg_server,
enterno.
Yous are and so prompted the following questions:*** Query: Create new privileged user account 'cyg_server'? (aye/no) yes *** Query: Please enter the countersign: *** Query: Renter:
Nevertheless, if you desire to utilize a different name, enter
yes.
Yous are so prompted the post-obit questions:*** Query: Enter the new user name: cyg_server1 *** Query: Reenter: cyg_server1 *** Query: Create new privileged user account 'cyg_server1'? (yep/no) yes *** Query: Please enter the countersign: *** Query: Reenter:
If the configuration is successful, you will see the following message:
Host configuration finished. Have fun!
-
Backup the
c:\cygwin\etc\passwd
file and then apply whatever editor to open the file in edit style. Remove only those entries of the user that yous will use to connect to the host on which yous desire to install a Management Agent. Enquire the user to brand a backup of thec:\cygwin\etc\passwd
file before editing.-
If the user that you are employing to connect to the host on which you want to install the Management Agent is a local user, run
C:\cygwin\Cygwin.bat
and execute the following:/bin/mkpasswd -l –u <USER> >> /etc/passwd (for case, /bin/mkpasswd -fifty -u pjohn >> /etc/passwd)
-
If the user you are employing to connect to the host on which you want to install the Management Amanuensis running is a domain user, run
C:\cygwin\Cygwin.bat
and execute the following:/bin/mkpasswd -d -u <USER> >> /etc/passwd (for example, /bin/mkpasswd -d -u pjohn >> /etc/passwd) mkdir -p /abode/<USER> (for instance, mkdir -p /home/pjohn) chown <USER> /dwelling house/<USER> (for case, chown pjohn /domicile/pjohn)
-
-
(Only if the Cygwin software you accept installed is of version i.7.32 or higher) Open
C:\cygwin\etc\sshd_config
in a text editor and add the post-obit line to the end of the file:KexAlgorithms diffie-hellman-grouping-exchange-sha1,diffie-hellman-group1-sha1
-
(For a domain user only) If the user you are employing to connect to the host on which you want to install the Management Amanuensis is a domain user, exercise the following to first the SSH daemon:
-
Right-click on My Computer, and select Manage.
-
In the Computer Management dialog box that appears, get to Services and Applications, and select CYGWIN sshd.
-
Right-click CYGWIN sshd and select Properties.
-
In the Backdrop dialog box, go to the Log On tab.
-
Here, specify the domain/user proper name and countersign. Click Utilise.
-
Run
C:\cygwin\Cygwin.bat
, and execute the following:chown <USERNAME> /var/log/sshd.log chown -R <USERNAME> /var/empty chown <USERNAME> /etc/ssh* chmod 755 /var/empty chmod 644 /var/log/sshd.log
Notation:
If
/var/log/sshd.log
does non be, you practise not accept to execute the following commands:chown <USERNAME> /var/log/sshd.log chmod 644 /var/log/sshd.log
-
-
Perform ane of the following steps to start the SSH daemon:
Run
C:\cygwin\Cygwin.bat
and execute the following command:/usr/sbin/sshd
OR
Run
C:\cygwin\Cygwin.bat
and execute the following command:cygrunsrv -Due south sshd
OR
Perform these steps:
-
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.
-
Click CYGWIN sshd, then click the Start push.
Note:
If the SSH daemon does not commencement upwardly, view the
c:\cygwin\var\log\sshd.log
file for data on why the start up failed. -
-
Y'all tin can now test your Cygwin setup.
To do this, go to a different machine (that has the
ssh
client running), and execute the post-obit command:ssh -fifty <USERNAME> <localhost> 'engagement' OR ssh -l <USERNAME> <this node> 'date'
For instance,
ssh -l pjohn instance.com 'date'
This control will prompt you to specify the password. When you lot specify the correct password, the control should return the accurate appointment.
Annotation:
If you experience a process fork failure, memory leak error, or a file admission mistake later on configuring SSH, view the post-obit website for a workaround:
http://cygwin.com/faq.html
If you are unable to find a workaround for your problem, report your trouble to the Cygwin community using the following website:
http://cygwin.com/problems.html
5.5 After Installing Cygwin and Configuring SSH
Afterward installing Cygwin (as described in Section 5.three) and configuring SSH (as described in Section five.4), follow these steps:
-
If the OMS host runs on a Microsoft Windows platform, perform the post-obit on the OMS host:
-
Correct click My Computer, then select Properties. In the window that appears, select Advanced system settings, then select Environment Variables. In the System Variables section, create the
CYGWIN
variable, and specify its value asnodosfilewarning
Note:
You lot practise not need to restart the host after performing this step.
-
Navigate to the Cygwin install directory (that is,
C:\cygwin
if you chose to install Cygwin in the default location), open up theCygwin.bat
file in edit mode using whatsoever editor, then edit the post-obit line:set up CYGWIN=binmode ntsec nodosfilewarning
For example, these are the contents of the
Cygwin.bat
file after editing the above line:@repeat off C: chdir C:\cygwin\bin fix CYGWIN=binmode ntsec nodosfilewarning bash --login -i
-
From the Start menu, select Run. For Open, enter
services.msc,
then click OK. Search for the Cygwin SSHD service and stop it. -
Navigate to the Cygwin install directory (that is,
C:\cygwin
if y'all chose to install Cygwin in the default location), then runCygwin.bat.
Run the following command to start the SSHD service:$ /usr/sbin/sshd
Annotation:
Running this control may return an mistake mentioning that
/var/empty
must be endemic past the root user. If you see this fault, run the post-obit from the Cygwin terminal:$ chown <windows_install_user>:<windows_install_group> /var/empty
After running this command, retry the
$ /usr/sbin/sshd
control.
-
-
Perform the tasks mentioned in Pace i on all the Microsoft Windows target hosts (on which you lot want to install Direction Agents using the Add Host Targets Wizard or EM CLI).
DOWNLOAD HERE
Posted by: davieslacul1953.blogspot.com