window 上安装 Cygwin 和 SSH 服务
2016-07-12 18:05
204 查看
背景: 从unix 机器上 SSH 到 window机器上,要在window 上安装 Cygwin 和 SSH 服务
http://www.cygwin.com/
1. 安装 Cygwin:
1.1 下载安装程序
http://www.cygwin.com/ 1.2 双击安装程序 以及 选择参数
1.3 选择SSH 包 (默认是没有SSH 的,要手动选择. 不知道选哪个就都选中)。
依次点下一步直到完成。
2. 配置
SSH
2.1 配置环境变量
右击我的电脑 , 属性> 高级> 环境变量在系统变量下 点击新建, 添加变量名 CYGWIN , 变量值 ntsec 在系统变量下, 编辑Path, 添加 ;c:\cygwin\bin2.2 配置 SSHD 服务
运行C:\cygwin64\Cygwin.bat
或终端在窗口中输入
ssh-host-config
*** 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/no如果用相同的名字
cyg_server,输入
no.
*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes*** Query: Please enter the password:*** Query: Renter:如果选择不同的名字, 输入
yes.
*** 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:配置成功,你会看到下面消息:
Host configuration finished. Have fun!这样会在 控制面板 —>服务 里面 看到
2.3 配置账户
右击 我的电脑, 选择 管理在弹出框里(在服务与应用下), 选择 CYGWIN sshd.右击CYGWIN sshd 选择属性.在弹出框上, 选择 登陆.指定用户名和密码. 点击应用.2.4 启动与停止SSH 服务
a 启动在Cygwin终端 输入bash 再输入 netstart sshd 或者控制面板->服务 直接手动CYGWIN sshd 右键选择启动或者双击C:\cygwin64\Cygwin.bat cygrunsrv -S sshdb 停止在Cygwin终端 输入 net stop sshd3. 测试与连接
用putty登陆 里的UNIX系统(账号 是2.3 设置的), 输入SSH 机器名或者IP4. 更多问题 参见
http://allthingsmarked.com/2006/08/17/how-to-set-up-a-windows-ssh-server-for-vnc-tunneling/https://docs.oracle.com/cd/E24628_01/install.121/e22624/preinstall_req_cygwin_ssh.htm#EMBSC340相关文章推荐
- android异步处理,分析Handle消息机制
- Frogger poj2253 + 测试数据
- display和visibility的区别
- Linux_mount命令的使用
- Linux下双网卡绑定
- 示波器高压差分探头的了解及常见测量方法
- Python使用SocketServer模块编写基本服务器程序的教程
- untiy3d网格合并和保存
- SymmetricDS 完全配置安装手册
- iCloud配置问题(iOS 支持iCloud)
- SymmetricDS 完全配置安装手册
- 问题--用户不能被关注
- App服务端架构变迁
- Maven将java工程打成tar包
- Mac版Android Studio Git 的配置以及提交到仓库
- Android ApplicationId 与 PackageName
- bean的加载(十)属性注入
- MYSQL explain详解
- wireshark基本用法及过虑规则
- [JS实例] 跟随鼠标移动而发生视差动画的图片