{"id":700,"date":"2015-02-02T11:33:53","date_gmt":"2015-02-02T18:33:53","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=700"},"modified":"2015-02-02T11:33:53","modified_gmt":"2015-02-02T18:33:53","slug":"installing-cygwin-and-starting-the-ssh-daemon","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2015\/02\/02\/installing-cygwin-and-starting-the-ssh-daemon\/","title":{"rendered":"Installing Cygwin and Starting the SSH Daemon"},"content":{"rendered":"<p>This chapter explains how to install Cygwin and start the <a id=\"sthref164\"><\/a>SSH daemon on Microsoft Windows hosts. This chapter is applicable only when you want to install a Management Agent on a Microsoft Windows host, using the Add Host Targets Wizard or EM CLI. In particular, this chapter covers the following:<\/p>\n<ul>\n<li><a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CBHCDFEE\">About the Cygwin Requirement for Installing Management Agents<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CBHBEJHE\">Before You Begin Installing Cygwin<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CBHIAFGI\">Installing Cygwin<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CHDJDBIA\">Configuring SSH<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CHDHDDAD\">After Installing Cygwin and Configuring SSH<\/a><\/li>\n<\/ul>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Important:<\/p>\n<p>If you do not want to install Cygwin to deploy Management Agents on Microsoft Windows hosts using the Add Host Targets Wizard or EM CLI, you can choose to deploy Management Agents on these hosts using the PsExec process utility. For information on how to deploy Management Agents on Microsoft Windows hosts using PsExec, see <a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/appdx_install_agent_psexec.htm#CHDGGHFF\">Appendix F<\/a>.<\/div>\n<div id=\"EMBSC151\" class=\"sect1\">\n<h2 class=\"sect1\"><span class=\"secnum\">5.1<\/span> <a id=\"sthref165\"><\/a>About the Cygwin Requirement for Installing Management Agents<\/h2>\n<p>The Add Host Targets Wizard is an application built into the Enterprise Manager Cloud Control console. It offers GUI-rich, interactive screens that enable you to install Oracle Management Agents (Management Agents) on unmanaged hosts and convert them to managed hosts, so that they can be monitored and managed in Enterprise Manager Cloud Control.<\/p>\n<p>When you use the <a id=\"sthref166\"><\/a>Add 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 <a id=\"sthref167\"><\/a>SSH Daemon on the host. To do so, follow the steps listed in <a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CBHIAFGI\">Section 5.3<\/a>.<\/p>\n<p>Cygwin is essentially<a id=\"sthref168\"><\/a> a utility that offers a Linux-like environment on a Microsoft Windows host. Technically, it is a DLL (<code dir=\"ltr\">cygwin1.dll<\/code>) that acts as a Linux API layer providing substantial Linux API functionality. Once you install Cygwin, you can configure the SSH Daemon on the host. The Add Host Targets Wizard is certified and supported with <a id=\"sthref169\"><\/a><span class=\"bold\">Cygwin 1.7.<\/span><\/p>\n<p>The SSH Daemon enables the Add Host Targets Wizard to establish 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.<\/p>\n<\/div>\n<div id=\"EMBSC243\" class=\"sect1\">\n<h2 class=\"sect1\"><span class=\"secnum\">5.2<\/span> Be<a id=\"sthref170\"><\/a>fore You Begin Installing Cygwin<\/h2>\n<p>Before 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:<\/p>\n<ol>\n<li>Ensure <code dir=\"ltr\">OpenSSH\\bin<\/code> and <code dir=\"ltr\">mksnt<\/code> are not in your <code dir=\"ltr\">PATH<\/code> environment variable. If they are, remove them by doing the following:\n<ol>\n<li>Right-click on <span class=\"bold\">My Computer<\/span> and go to <span class=\"bold\">Properties<\/span>.<\/li>\n<li>In the System Properties window, click <span class=\"bold\">Advanced.<\/span><\/li>\n<li>In this tab, click <span class=\"bold\">Environment Variables.<\/span><\/li>\n<li>Here, search for the <code dir=\"ltr\">PATH<\/code> system variable, select it, and if the <code dir=\"ltr\">OpenSSH\\bin<\/code> and <code dir=\"ltr\">mksnt<\/code> are present in <code dir=\"ltr\">PATH,<\/code> click <span class=\"bold\">Edit.<\/span><\/li>\n<li>In the Edit System Variable dialog box, delete these two values from <code dir=\"ltr\">PATH,<\/code>then click <span class=\"bold\">OK.<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_1.JPG\" alt=\"Surrounding text describes cygwin_1.JPG.\" width=\"411\" height=\"463\" \/><\/li>\n<li>Stop the SSH Daemon if it is running from <code dir=\"ltr\">OpenSSH<\/code>, <code dir=\"ltr\">MKS<\/code> or any other vendor. If the SSH Daemon is running, stop it by doing the following:\n<ol>\n<li>Right-click on <span class=\"bold\">My Computer<\/span>, and select <span class=\"bold\">Manage.<\/span><\/li>\n<li>In the Computer Management window, in the left pane, expand <span class=\"bold\">Services and Applications<\/span>, and select <span class=\"bold\">Services<\/span>.<\/li>\n<li>In the right pane, click the SSH Daemon\/MKS Secure Shell service, then click the Stop button.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_2.JPG\" alt=\"Surrounding text describes cygwin_2.JPG.\" width=\"841\" height=\"689\" \/><\/li>\n<\/ol>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>The navigational steps described in this section may vary for different Microsoft Windows operating systems.<\/p><\/div>\n<\/div>\n<div id=\"EMBSC152\" class=\"sect1\">\n<h2 class=\"sect1\"><span class=\"secnum\">5.3<\/span> Installing Cygwin<\/h2>\n<p>To <a id=\"sthref171\"><\/a>install Cygwin <a id=\"sthref172\"><\/a>on a Microsoft Windows host, follow these steps:<\/p>\n<ol>\n<li>Access the following URL, then click <span class=\"bold\">Install Cygwin:<\/span>\n<p><code dir=\"ltr\"><a class=\"newwindow\" href=\"http:\/\/www.cygwin.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.cygwin.com\/<img decoding=\"async\" src=\"http:\/\/docs.oracle.com\/en\/dcommon\/img\/new-window.png\" alt=\"Opens a new window\" \/><\/a><\/code><\/li>\n<li id=\"CBHGDIEH\">Download the 32-bit version (if you are running a 32-bit 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.<a id=\"sthref173\"><\/a><\/li>\n<li>Run the setup executable, then click <span class=\"bold\">Next<\/span> to proceed.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin1.gif\" alt=\"Surrounding text describes cygwin1.gif.\" width=\"536\" height=\"393\" \/><\/li>\n<li>On the Choose Installation Type screen, select <span class=\"bold\">Install from Internet,<\/span> then click <span class=\"bold\">Next.<\/span>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin2.gif\" alt=\"Surrounding text describes cygwin2.gif.\" width=\"537\" height=\"391\" \/><\/li>\n<li>On the Choose Installation Directory screen, enter <span class=\"bold\">C:\\cygwin<\/span> as the Root Directory, then click <span class=\"bold\">Next.<\/span>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>If you choose to install Cygwin in a different directory, then ensure that you update the<code dir=\"ltr\">SSH_PATH, SCP_PATH, MKDIR_PATH, SH_PATH, CHMOD_PATH<\/code>, and <code dir=\"ltr\">TRUE<\/code> properties present in the<code dir=\"ltr\">$&lt;OMS_HOME&gt;\\oui\\prov\\resources\\ssPaths_msplats.properties<\/code> file to their proper Cygwin binary values, after installing the Enterprise Manager system.For example, if you choose to install Cygwin in the <code dir=\"ltr\">D:\\software\\cygwin<\/code> directory, then update the specified properties in the following manner:<\/p>\n<pre>SCP_PATH=D:\\software\\cygwin\\bin\\scp.exe\nSH_PATH=D:\\software\\cygwin\\bin\\sh.exe\nCHMOD_PATH=D:\\software\\cygwin\\bin\\chmod.exe\nLS_PATH=D:\\software\\cygwin\\bin\\ls.exe\n<\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin3.gif\" alt=\"Surrounding text describes cygwin3.gif.\" width=\"537\" height=\"392\" \/><\/li>\n<li>On the Select Local Package Directory screen, select a directory on your local machine where you want to store the downloaded installation files, then click <span class=\"bold\">Next.<\/span>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_3.JPG\" alt=\"Surrounding text describes cygwin_3.JPG.\" width=\"542\" height=\"397\" \/><\/li>\n<li>On the Select Connection Type screen, select appropriate settings to connect to the internet, then click <span class=\"bold\">Next.<\/span>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin5.gif\" alt=\"Surrounding text describes cygwin5.gif.\" width=\"542\" height=\"396\" \/><\/li>\n<li>On the Choose Download Site(s) screen, select any site from the available list, then click <span class=\"bold\">Next.<\/span>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin6.gif\" alt=\"Surrounding text describes cygwin6.gif.\" width=\"537\" height=\"392\" \/><\/li>\n<li>On the select pac<a id=\"sthref174\"><\/a>kages screen, ensure that you select the following packages, then click <span class=\"bold\">Next<\/span>:\n<p>From the <span class=\"bold\">Archive<\/span> category, select <code dir=\"ltr\">unzip<\/code> and <code dir=\"ltr\">zip<\/code> as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_4.jpg\" alt=\"Surrounding text describes cygwin_4.jpg.\" width=\"525\" height=\"163\" \/><br \/>\nFrom the <span class=\"bold\">Net<\/span> category, select <code dir=\"ltr\">openssh<\/code> and <code dir=\"ltr\">openssl<\/code> as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_5.jpg\" alt=\"Surrounding text describes cygwin_5.jpg.\" width=\"670\" height=\"129\" \/><br \/>\nAfter selecting the packages and clicking <span class=\"bold\">Next,<\/span> the Resolving Dependencies screen is displayed. Click <span class=\"bold\">Next<\/span> to proceed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_6.JPG\" alt=\"Surrounding text describes cygwin_6.JPG.\" width=\"541\" height=\"396\" \/><\/li>\n<li>On the Installation Status and Create Icons screen, do not make any changes. Click <span class=\"bold\">Finish<\/span> to complete the installation process.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin10.gif\" alt=\"Surrounding text describes cygwin10.gif.\" width=\"536\" height=\"396\" \/><\/li>\n<\/ol>\n<\/div>\n<div id=\"EMBSC281\" class=\"sect1\">\n<h2 class=\"sect1\"><span class=\"secnum\">5.4<\/span> Confi<a id=\"sthref175\"><\/a>guring<a id=\"sthref176\"><\/a> SSH<\/h2>\n<p>This section describes how to configure <a id=\"sthref177\"><\/a>SSH and test your Cygwin setup after installing Cygwin on a host.<\/p>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>While configuring SSH, you may need to run the <a id=\"sthref178\"><\/a><a id=\"sthref179\"><\/a><code dir=\"ltr\">cygwin.bat<\/code> script. While running <code dir=\"ltr\">cygwin.bat<\/code> in Microsoft Windows Server 2008 and Microsoft Windows Vista, ensure that you invoke it in administrator mode. To do this, right-click the <code dir=\"ltr\">cygwin.bat<\/code> file and select <span class=\"bold\">Run as administrator.<\/span><\/div>\n<p>To configure SSH and test your Cygwin setup, follow these steps:<\/p>\n<ol>\n<li>After you install Cygwin, navigate to the <code dir=\"ltr\">C:\\cygwin<\/code> directory, open the <code dir=\"ltr\">Cygwin.bat<\/code> file in edit mode using any editor, and add the following line before invoking the bash shell.\n<p><code dir=\"ltr\">set CYGWIN=binmode ntsec<\/code><\/p>\n<p>For example, here are the contents for the <code dir=\"ltr\">Cygwin.bat<\/code> file after adding the above line:<\/p>\n<pre>@echo off\n\nC:\nchdir C:\\cygwin\\bin\n<span class=\"bold\">set CYGWIN=binmode ntsec<\/span>\nbash --login -i\n<\/pre>\n<\/li>\n<li>To verify if Cygwin (<code dir=\"ltr\">cygrunsrv)<\/code> is installed properly, run <code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code>, and execute the following command:\n<pre>cygrunsrv -h\n<\/pre>\n<p>If Cygwin is installed properly, then all the Cygwin help options are displayed on the screen. However, if this command returns an error message, then you may have to reinstall Cygwin.<\/li>\n<li>To configure the SSHD service, run <code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code>, and execute the following command:\n<pre>ssh-host-config\n<\/pre>\n<p>After running the command, you are prompted the following questions:<\/p>\n<pre>*** Query: Should privilege separation be used? &lt;yes\/no&gt;: <span class=\"bold\">yes<\/span>\n*** Query: New local account 'sshd'? &lt;yes\/no&gt;: <span class=\"bold\">yes<\/span>\n*** Query: Do you want to install sshd as a service?\n*** Query: &lt;Say \"no\" if it is already installed as a service&gt; &lt;yes\/no&gt;: <span class=\"bold\">yes<\/span>\n*** Query: Enter the value of CYGWIN for the deamon: [] <span class=\"bold\">binmode ntsec<\/span>\n*** Query: Do you want to use a different name? (yes\/no) <span class=\"bold\">yes\/no<\/span>\n<\/pre>\n<p>At this point, if you want to use the same name, that is <code dir=\"ltr\">cyg_server,<\/code> enter <code dir=\"ltr\">no.<\/code> You are then prompted the following questions:<\/p>\n<pre>*** Query: Create new privileged user account 'cyg_server'? (yes\/no) <span class=\"bold\">yes<\/span>\n*** Query: Please enter the password:\n*** Query: Renter:\n<\/pre>\n<p>However, if you want to use a different name, enter <code dir=\"ltr\">yes.<\/code> You are then prompted the following questions:<\/p>\n<pre>*** Query: Enter the new user name: cyg_server1\n*** Query: Reenter: cyg_server1\n*** Query: Create new privileged user account 'cyg_server1'? (yes\/no) <span class=\"bold\">yes<\/span>\n*** Query: Please enter the password:\n*** Query: Reenter:\n<\/pre>\n<p>If the configuration is successful, you will see the following message:<\/p>\n<pre>Host configuration finished. Have fun!\n<\/pre>\n<\/li>\n<li>Backup the <code dir=\"ltr\">c:\\cygwin\\etc\\passwd<\/code> file and then use any editor to open the file in edit mode. Remove only those entries of the user that you will use to connect to the host on which you want to install a Management Agent. Ask the user to make a backup of the<code dir=\"ltr\">c:\\cygwin\\etc\\passwd<\/code> file before editing.\n<ul>\n<li>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<code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code> and execute the following:\n<pre>\/bin\/mkpasswd -l \u2013u &lt;USER&gt; &gt;&gt; \/etc\/passwd (for example, \/bin\/mkpasswd -l -u pjohn &gt;&gt; \/etc\/passwd)\n<\/pre>\n<\/li>\n<li>If the user you are employing to connect to the host on which you want to install the Management Agent running is a domain user, run<code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code> and execute the following:\n<pre>\/bin\/mkpasswd -d -u &lt;USER&gt; &gt;&gt; \/etc\/passwd (for example, \/bin\/mkpasswd -d -u pjohn &gt;&gt; \/etc\/passwd)\nmkdir -p \/home\/&lt;USER&gt;  (for example, mkdir -p \/home\/pjohn)\nchown &lt;USER&gt; \/home\/&lt;USER&gt; (for example, chown pjohn \/home\/pjohn)\n<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><span class=\"italic\">(Only if the Cygwin software you have installed is of version 1.7.32 or higher)<\/span> Open <code dir=\"ltr\">C:\\cygwin\\etc\\sshd_config<\/code> in a text editor and add the following line to the end of the file:\n<p><code dir=\"ltr\">KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1<\/code><\/li>\n<li><span class=\"italic\">(For a domain user only)<\/span> If the user you are employing to connect to the host on which you want to install the Management Agent is a domain user, do the following to start the <a id=\"sthref180\"><\/a>SSH daemon:\n<ol>\n<li>Right-click on <span class=\"bold\">My Computer<\/span>, and select <span class=\"bold\">Manage<\/span>.<\/li>\n<li>In the Computer Management dialog box that appears, go to Services and Applications, and select <span class=\"bold\">CYGWIN sshd<\/span>.<\/li>\n<li>Right-click <span class=\"bold\">CYGWIN sshd<\/span> and select <span class=\"bold\">Properties<\/span>.<\/li>\n<li>In the Properties dialog box, go to the <span class=\"bold\">Log On<\/span> tab.<\/li>\n<li>Here, specify the domain\/user name and password. Click <span class=\"bold\">Apply.<\/span><\/li>\n<li>Run <code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code>, and execute the following:\n<pre>chown &lt;USERNAME&gt; \/var\/log\/sshd.log\nchown -R &lt;USERNAME&gt; \/var\/empty\nchown &lt;USERNAME&gt; \/etc\/ssh*\nchmod 755 \/var\/empty\nchmod 644 \/var\/log\/sshd.log\n<\/pre>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>If <code dir=\"ltr\">\/var\/log\/sshd.log<\/code> does not exist, you do not have to execute the following commands:<\/p>\n<pre>chown &lt;USERNAME&gt; \/var\/log\/sshd.log\nchmod 644 \/var\/log\/sshd.log\n<\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<li>Perform one of the following steps to start the SSH daemon:\n<p>Run <code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code> and execute the following command:<\/p>\n<p><code dir=\"ltr\">\/usr\/sbin\/sshd<\/code><\/p>\n<p><span class=\"bold\">OR<\/span><\/p>\n<p>Run <code dir=\"ltr\">C:\\cygwin\\Cygwin.bat<\/code> and execute the following command:<\/p>\n<p><code dir=\"ltr\">cygrunsrv -S sshd<\/code><\/p>\n<p><span class=\"bold\">OR<\/span><\/p>\n<p>Perform these steps:<\/p>\n<ol>\n<li>Right-click on <span class=\"bold\">My Computer<\/span>, and select <span class=\"bold\">Manage<\/span>.<\/li>\n<li>In the Computer Management dialog box that appears, go to Services and Applications, and select <span class=\"bold\">CYGWIN sshd<\/span>.<\/li>\n<li>Click <span class=\"bold\">CYGWIN sshd,<\/span> then click the Start button.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/img\/cygwin_start_service.jpg\" alt=\"Surrounding text describes cygwin_start_service.jpg.\" width=\"779\" height=\"332\" \/><\/p>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>If the SSH daemon does not start up, view the <code dir=\"ltr\">c:\\cygwin\\var\\log\\sshd.log<\/code> file for information on why the start up failed.<\/div>\n<\/li>\n<li>You can now test your Cygwin setup.\n<p>To do this, go to a different machine (that has the <code dir=\"ltr\">ssh<\/code> client running), and execute the following command:<\/p>\n<pre>ssh -l &lt;USERNAME&gt; &lt;localhost&gt; 'date'\n\nOR\n\nssh -l &lt;USERNAME&gt; &lt;this node&gt; 'date'\n<\/pre>\n<p>For example,<\/p>\n<pre>ssh -l pjohn example.com 'date'\n<\/pre>\n<p>This command will prompt you to specify the password. When you specify the correct password, the command should return the accurate date.<\/li>\n<\/ol>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>If you experience a process fork failure, memory leak error, or a file access error after configuring SSH, view the following website for a workaround:<code dir=\"ltr\"><a class=\"newwindow\" href=\"http:\/\/cygwin.com\/faq.html\" target=\"_blank\" rel=\"noopener\">http:\/\/cygwin.com\/faq.html<img decoding=\"async\" src=\"http:\/\/docs.oracle.com\/en\/dcommon\/img\/new-window.png\" alt=\"Opens a new window\" \/><\/a><\/code><\/p>\n<p>If you are unable to find a workaround for your problem, report your problem to the Cygwin community using the following website:<\/p>\n<p><code dir=\"ltr\"><a class=\"newwindow\" href=\"http:\/\/cygwin.com\/problems.html\" target=\"_blank\" rel=\"noopener\">http:\/\/cygwin.com\/problems.html<img decoding=\"async\" src=\"http:\/\/docs.oracle.com\/en\/dcommon\/img\/new-window.png\" alt=\"Opens a new window\" \/><\/a><\/code><\/p>\n<\/div>\n<\/div>\n<div id=\"EMBSC340\" class=\"sect1\">\n<h2 class=\"sect1\"><span class=\"secnum\">5.5<\/span> After Inst<a id=\"sthref181\"><\/a>alling Cygwin and Configuring SSH<\/h2>\n<p>After installing Cygwin (as described in <a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CBHIAFGI\">Section 5.3<\/a>) and configuring SSH (as described in <a href=\"http:\/\/docs.oracle.com\/cd\/E24628_01\/install.121\/e22624\/preinstall_req_cygwin_ssh.htm#CHDJDBIA\">Section 5.4<\/a>), follow these steps:<\/p>\n<ol>\n<li>If the OMS host runs on a Microsoft Windows platform, perform the following on the OMS host:\n<ol>\n<li>Right click <span class=\"bold\">My Computer,<\/span> then select <span class=\"bold\">Properties.<\/span> In the window that appears, select <span class=\"bold\">Advanced system settings,<\/span> then select<span class=\"bold\">Environment Variables.<\/span> In the System Variables section, create the <code dir=\"ltr\">CYGWIN<\/code> variable, and specify its value as <code dir=\"ltr\">nodosfilewarning<\/code>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>You do not need to restart the host after performing this step.<\/p><\/div>\n<\/li>\n<li>Navigate to the Cygwin install directory (that is, <code dir=\"ltr\">C:\\cygwin<\/code> if you chose to install Cygwin in the default location), open the <code dir=\"ltr\">Cygwin.bat<\/code>file in edit mode using any editor, then edit the following line:\n<pre>set CYGWIN=binmode ntsec <span class=\"bold\">nodosfilewarning<\/span>\n<\/pre>\n<p>For example, these are the contents of the <code dir=\"ltr\">Cygwin.bat<\/code> file after editing the above line:<\/p>\n<pre>@echo off\n\nC:\nchdir C:\\cygwin\\bin\nset CYGWIN=binmode ntsec nodosfilewarning\nbash --login -i\n<\/pre>\n<\/li>\n<li>From the <span class=\"bold\">Start<\/span> menu, select <span class=\"bold\">Run.<\/span> For <span class=\"bold\">Open,<\/span> enter <code dir=\"ltr\">services.msc,<\/code> then click <span class=\"bold\">OK.<\/span> Search for the Cygwin SSHD service and stop it.<\/li>\n<li>Navigate to the Cygwin install directory (that is, <code dir=\"ltr\">C:\\cygwin<\/code> if you chose to install Cygwin in the default location), then run <code dir=\"ltr\">Cygwin.bat.<\/code>Run the following command to start the SSHD service:\n<pre>$ \/usr\/sbin\/sshd\n<\/pre>\n<div class=\"infoboxnote\">\n<p class=\"notep1\">Note:<\/p>\n<p>Running this command may return an error mentioning that <code dir=\"ltr\">\/var\/empty<\/code> must be owned by the <span class=\"italic\">root<\/span> user. If you encounter this error, run the following from the Cygwin terminal:<\/p>\n<pre>$ chown &lt;windows_install_user&gt;:&lt;windows_install_group&gt; \/var\/empty\n<\/pre>\n<p>After running this command, retry the <code dir=\"ltr\">$ \/usr\/sbin\/sshd<\/code> command.<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<li>Perform the tasks mentioned in Step 1 on all the Microsoft Windows target hosts (on which you want to install Management Agents using the Add Host Targets Wizard or EM CLI).<\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=700"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/700\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}