Skip to content

Instantly share code, notes, and snippets.

@miebach
Last active October 12, 2015 17:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miebach/4062774 to your computer and use it in GitHub Desktop.
Save miebach/4062774 to your computer and use it in GitHub Desktop.
Cygwin
Download http://cygwin.org/setup.exe
Save as c:\opt\cygwin\setup.exe
Store packages at c:\opt\cygwin\package
----
See also https://gist.github.com/1059810 for a "cygwin-here" registry modificatioon.
----
Find out the cygwin package a file/program belongs to: http://cygwin.com/packages/
----
# permissions
mkgroup -l > /etc/groups
mkpasswd -l > /etc/passwd
# SSH host setup:
ssh-host-config
Value of CYGWIN = binmode ntsec
In case of an error message regarding permissions of /var run the following and repeat ssh-host-config afterwards:
chmod 755 /var
chmod ug-s /var
(from http://serverfault.com/questions/209480/cgywin-issue-setting-var-permissions-for-ssh )
# SSHd config
nano /etc/sshd_config
Port 22
Port 22000
AllowUsers remoteuser1 remoteuser2 cygwinuser*
# query service:
cygrunsrv -Q sshd
# start service:
cygrunsrv -S sshd
# or:
net start sshd
# stop service:
cygrunsrv -E sshd
# create client keys and set permissions (as user):
ssh-user-config
# create keys for users (as user)
ssh-keygen
rem Update Script for unattended package install, includes a list of packages
c:
cd c:\cygwin
setup.exe -q -P screen,inetutils,util-linux,less,ncurses,openssh,mc,perl,vim,nano,rxvt,wget,curl,whois,procps
@echo off
set CYGWIN=binmode ntsec
rem # CYGWIN=tty - "tty" option in CYGWIN environment variableis
rem # Is no longer supported.
rem # Use a terminal emulator like mintty, xterm, or rxvt.
C:
chdir C:\bin
bash --login -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment