Last active
October 12, 2015 17:37
-
-
Save miebach/4062774 to your computer and use it in GitHub Desktop.
Cygwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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