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 Agent on a Microsoft Windows host, using the Add Host Targets Wizard or EM CLI. In particular, this chapter covers the following:
7.1 Overview
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.
When you use the Add Host Targets Wizard 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 7.3.
Cygwin is essentially a utility that offers a Linux-like 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. Once you install Cygwin, you can configure the SSH Daemon on the host. The Add Host Targets Wizard is certified and supported with Cygwin 1.7.
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.
7.2 Before You Begin
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:
Ensure
OpenSSH\binandmksntare not in yourPATHenvironment 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
PATHsystem variable, select it, and if theOpenSSH\binandmksntare present inPATH,click Edit.In the Edit System Variable dialog box, delete these two values from
PATH,then click OK.
Stop the SSH Daemon if it is running from
OpenSSH,MKSor any other vendor. If the SSH Daemon is running, stop it by doing the following: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, 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.
7.3 Installing Cygwin
To install Cygwin on a Microsoft Windows host, follow these steps:
Access the following URL, then click Install Cygwin:
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.
Run the setup executable, then click Next to proceed.

On the Choose Installation Type screen, select Install from Internet, then click Next.

On the Choose Installation Directory screen, enter C:\cygwin as the Root Directory, then click Next.
Note:
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, andTRUEproperties present in the$<OMS_HOME>/oui/prov/resources/ssPaths_msplats.propertiesfile to their proper Cygwin binary values, after installing the Enterprise Manager system.For example, if you choose to install Cygwin in the
D:/software/cygwindirectory, then update the specified properties in the following 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 machine where you want to store the downloaded installation files, then click Next.
On the Select Connection Type screen, select appropriate settings to connect to the internet, then click Next.

On the Choose Download Site(s) screen, select any site from the available list, then click Next.

On the select packages screen, ensure that you select the following packages, then click Next:
From the Archive category, select
unzipandzipas follows:
From the Net category, select
opensshandopensslas follows:
After selecting the packages and clicking Next, the Resolving Dependencies screen is displayed. Click Next to proceed.
On the Installation Status and Create Icons screen, do not make any changes. Click Finish to complete the installation process.

7.4 Configuring SSH After Installing Cygwin
This section describes how to configure SSH and test your Cygwin setup after installing Cygwin on a host.
Note:
While configuring SSH, you 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 it in administrator mode. To do this, right-click the cygwin.bat file and select Run as administrator.
To configure SSH and test your Cygwin setup, follow these steps:
After you install Cygwin, navigate to the
C:\cygwindirectory, open theCygwin.batfile in edit mode using any editor, and add the following line before invoking the bash shell.set CYGWIN=binmode ntsecFor example, here are the contents for the
Cygwin.batfile after adding the above line:@echo off C:
chdir C:\cygwin\bin
set CYGWIN=binmode ntsec
bash --login -iTo verify if Cygwin (
cygrunsrv)is installed properly, runC:\cygwin\Cygwin.bat, and execute the following command:cygrunsrv -h
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.
To install the SSHD service, run
C:\cygwin\Cygwin.bat, and execute the following command:ssh-host-config
After running the command, you are prompted the following questions:
*** Query: Should privilege separation be used? <yes/no>: yes
*** Query: New local account 'sshd'? <yes/no>: yes
*** Query: Do you want to install sshd as a service?
*** Query: <Say "no" if it is already installed as a service> <yes/no>: yes
*** Query: Enter the value of CYGWIN for the deamon: [] binmode ntsec
*** Query: Do you want to use a different name? (yes/no) yes/noAt this point, if you want to use the same name, that is
cyg_server,enterno.You are then prompted the following questions:*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes
*** Query: Please enter the password:
*** Query: Renter:However, if you want to use a different name, enter
yes.You are then prompted the following questions:*** Query: Enter the new user name: cyg_server1
*** Query: Reenter: cyg_server1
*** Query: Create new privileged user account 'cyg_server1'? (yes/no) yes
*** Query: Please enter the password:
*** Query: Reenter:If the configuration is successful, you will see the following message:
Host configuration finished. Have fun!
Backup the
c:\cygwin\etc\passwdfile 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 thec:\cygwin\etc\passwdfile 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.batand execute the following:/bin/mkpasswd -l –u <USER> >> /etc/passwd (for example, /bin/mkpasswd -l -u pjohn >> /etc/passwd)
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
C:\cygwin\Cygwin.batand execute the following:/bin/mkpasswd -d -u <USER> >> /etc/passwd (for example, /bin/mkpasswd -d -u pjohn >> /etc/passwd)
mkdir -p /home/<USER> (for example, mkdir -p /home/pjohn)
chown <USER> /home/<USER> (for example, chown pjohn /home/pjohn)
(domain user only) 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 SSH daemon:
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.
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.logNote:
If
/var/log/sshd.logdoes not exist, you do not have to execute the following commands:chown <USERNAME> /var/log/sshd.log
chmod 644 /var/log/sshd.log
Perform one of the following steps to start the SSH daemon:
Run
C:/cygwin/Cygwin.batand execute the following command:/usr/sbin/sshdOR
Run
C:/cygwin/Cygwin.batand execute the following command:cygrunsrv -S sshdOR
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 button.

Note:
If the SSH daemon does not start up, view the
c:\cygwin\var\log\sshd.logfile for information on why the start up failed.You can now test your Cygwin setup.
To do this, go to a different machine (that has the
sshclient running), and execute the following command:ssh -l <USERNAME> <localhost> 'date' OR ssh -l <USERNAME> <this node> 'date'
For example,
ssh -l pjohn example.com 'date'
This command will prompt you to specify the password. When you specify the correct password, the command should return the accurate date.
Note:
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:
If you are unable to find a workaround for your problem, report your problem to the Cygwin community using the following website:
http://cygwin.com/problems.html
原文引自:http://docs.oracle.com/cd/E24628_01/install.121/e22624/preinstall_req_cygwin_ssh.htm#CBHIAFGI
Installing Cygwin and Starting the SSH Daemon的更多相关文章
- Windows上安装配置SSH教程(5)——win10下使用Cygwin+Expect自动登陆ssh
1.安装Cygwin,安装上Tcl和Expect两个工具. 可以使用apt-cyg命令安装,也可以在安装Cygwin的时候选中这两个包. 命令安装的话使用下面的两个命令: apt-cyg instal ...
- Starting a Gradle Daemon, 5 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details FAILURE: Build failed with an exception. * What went wrong: Could not dispatch
执行gradle build出的问题,查看hs_err_pid11064.log日志文件发现,是电脑的RAM不足导致
- [原创]EBAZ4205 Linux log打印输出
下载器与板级之前的连接 JTAG红色为1脚,请注意 RX接板级TX TX接板级RX UART_Vref接板级VCC GND接板级GND U-Boot 2014.01 (Apr 14 2019 - 10 ...
- [原创]基于Zynq Linux环境搭建(四)
此篇编译根文件系统 下载busybox和dropbear, [#73#13:04:52 FPGADeveloper@ubuntu ~/Zybo_Demo/XilinxFS]$wget --no-che ...
- [转]busybox中telnet 功能添加
使用busybox制作的一个基本根文件系统如何添加telnetd服务呢? 下面把本人的添加过程列出来供大家分享,如有不同意见请不吝赐教! 1. 添加telnet的支持(busybox中配置) Netw ...
- cygwin在Windows8.1中设置ssh的问题解决
为了在Windows 8.1上直接使用Linux环境和hadoop开发,装了cygwin,同时设置ssh无密码登录. 但正常ssh-keygen后复制到authorised_keys后登录出现提示 ...
- linux ssh 使用深度解析(key登录详解)
SSH全称Secure SHell,顾名思义就是非常安全的shell的意思,SSH协议是IETF(Internet Engineering Task Force)的Network Working Gr ...
- 远程之SSH
SSH(Secure Shell的缩写),由 IETF 的网络工作小组(Network Working Group)所制定:SSH 为建立在应用层和传输层基础上的安全协议.SSH 是目前较可靠,专为远 ...
- [转]Creating an iPhone Daemon
ref: http://chrisalvares.com/blog/7/creating-an-iphone-daemon-part-1/ http://chrisalvares.com/blog/3 ...
随机推荐
- 基于 php-redis 的redis操作
基于 php-redis 的redis操作 林涛 发表于:2016-5-13 12:12 分类:PHP 标签:php,php-redis,redis 203次 redis的操作很多的,下面的例子都是基 ...
- K均值聚类(Kmeans)
Sigma = [1, 0; 0, 1]; mu1 = [1, -1]; x1 = mvnrnd(mu1, Sigma, 200); mu2 = [5.5, -4.5]; x2 = mvnrnd(mu ...
- form作为module name 悲剧了
爆出很无语的错误,也怪我,没有实地的debug. 所以,module name应该是不能碰关键词类似,最好custom一点好.
- phprpc 使用实例(例实没错却不能执行)函数冲突gzdecode
PHPRPC 是一个轻型的.安全的.跨网际的.跨语言的.跨平台的.跨环境的.跨域的.支持复杂对象传输的.支持引用参数传递的.支持内容输出重定向的.支持分级错误处理的.支持会话的.面向服务的高性能远程过 ...
- 物料BOM和生产订单BOM的区别
物料BOM和生产订单BOM的区别[@more@] 一般企业生产部在SAP创建生产订单的时候,就会产生一个生产订单BOM,这里的生产订单BOM是读取的物料BOM. 由于其它原因,需要修改成品的某几个零部 ...
- Controller简介
Controller控制器,是MVC中的部分C,为什么是部分呢?因为此处的控制器主要负责功能处理部分: 1.收集.验证请求参数并绑定到命令对象: 2.将命令对象交给业务对象,由业务对象处理并返回模型数 ...
- 1106c语言语法树
- 118. 119. Pascal's Triangle -- 杨辉三角形
118. Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, ...
- 转--CSS选择器详解(一)常用选择器
今天复习一下CSS的知识,看了篇文章觉得很好,转来备用. 转自:http://www.cnblogs.com/fattydoit/p/3492028.html 目录 类型选择器 类选择器 ID选择器 ...
- 使用cnblogs.com的用户体验和提出来的建议
1.是否提供良好的体验给用户(同时提供价值)? 我是很久以前就有CN的账号了的,因为这个网站有很多有用的信息,和比较活跃的论坛.很多不懂的问题可以求助上面的大神.但是,我第一次登陆主页面的时候我是懵逼 ...