Install URL:

https://cygwin.com/setup-x86_64.exe

Tools

install apt-cyg: https://github.com/transcode-open/apt-cyg

SSHD Service


1、以管理员身份登录

2、给文件授权,以完成sshd 服务的安装
$ chmod +r /etc/group
$ chmod +r /etc/passwd
$ chmod +rwx /var

2、安装 sshd 服务
$ ssh-host-config 

Query: Should privilege separation be used? (yes/no) yes
Query: (Say "no" if it is already installed as a service) (yes/no) yes
Query: Enter the value of CYGWIN for the daemon: [ntsec] ntsec
Query: Do you want to use a different name? (yes/no) no
不同版本的sshd问题不一样,假如有其他提问自己看着办

3、使用 windows 用户本地认证,即使用windows 的用户名和密码登录
$ mkpasswd -l > /etc/passwd 
$ mkgroup -l > /etc/group    

4、启动
$ cygrunsrv --start sshd
停止
$ cygrunsrv --stop sshd

5、客户端登录(假设服务器地址为192.168.1.100)
$ ssh [email protected]
  

ZSH

  1. see https://github.com/robbyrussell/oh-my-zsh

apt-cyg install zsh

#oh-my-zsh
 sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
 
# autojump 
 git clone git://github.com/joelthelion/autojump.git
 cd autojump
./install.py or ./uninstall.py
  1. .zshrc plugins=(git mvn autojump git-flow-completion)

修改cygwin 默认bash 为zsh