Summary: New page: (1a) Login as Administrator Windows XP – login as a user with Administrator privilege; Windows 2003 Server: login as local admin, it will not work for domain users or domain admin. (1b) M…
Windows XP – login as a user with Administrator privilege;
Windows 2003 Server: login as local admin, it will not work for domain users or domain admin.
(1b) Make sure the current admin/user has a Windows password set.
If not, use g Control Panel…User Accounts to create a password.
Just to be on the safe side, after you created a password, logoff and then log in again.
(2a) Create a folder c:\cygwin
(2b) g Download cygwin’s setup.exe from http://www.cygwin.com/ and save setup.exe in c:\cygwin
Cygwin’s setup.exe has some uncommon properties, click here to find out more.
Click Start…Run…and type c:\cygwin\setup.exe
If you are asked to select "Just Me" or "All Users", choose "All Users"
When it asks for "Local Package Directory", type c:\cygwin
Choose a download site that is "close" to you.
When a selection screen comes up (you can resize the windows to see better),
click the little View button for "Full" view g,
find the package "openssh", click on the word "skip" so that an x appears in Column B,
see this illustration.
(optional) find the package "tcp_wrappers", click on the word "skip" so that an x appears in Column B,
if you add "tcp_wrapper", you will most likely get "ssh-exchange-identification: Connectiion closed by remote host" error.
If you get that error, edit the file /etc/hosts.allow and add these two lines
ALL: 127.0.0.1/32 : allow
ALL: [::1]/128: allow
before the PARANOID line.
(optional) find the package "diffutils", click on the word "skip" so that an x appears in Column B,
find the package "zlib", click on the word "skip" (it should be already selected) so that an x appears in Column B.
Notes:
tcp_wrappers provides host-based access control and possible need you to edit "/etc/hosts.allow"
zlib is the compression and decompression library that is used by many programs.
Thanks to Lex Sheehan on the diffutils tips, and Thomas Braun for the hosts.allow tips.
Click next to start installing cygwin and ssh.
Size of the basic cygwin system is more than 50 Meg, this may take a while.
Take a coffee break and wait.g
(3) Right click My Computer, Properties, Advanced, Environment Variables
See this illustration (red dots)
Click the "New" new button to add a new entry to System variables:
variable name is CYGWIN
variable value is ntsec tty
(4) Right click My Computer, Properties, Advanced, Environment Variables
See this illustration (green dots)
Select the Path variable and click the "Edit" edit button:
append ;c:\cygwin\bin to the end of the existing variable string.
(5)
For Windows Vista significant revisions to this page is needed.
In the interim, click here for how to install cygwin sshd under Vista.
You should login as a user with admin privilege and that user belongs to a Windows "Users" group.
For Windows XP , open a cygwin window by double clicking theg icon; a black screen pops open,
For Windows Vista and Windows 7 , right click the g icon and choose "run as administrator"; a black screen pops open, type
With recent releases of cygwin, there are many permission problems.
Add these 6 commands as work around:
chmod +r /etc/passwd
chmod u+w /etc/passwd
chmod +r /etc/group
chmod u+w /etc/group
chmod 755 /var
chmod 664 /var/log/sshd.log
ssh-host-config (manuall answer Yes to questions except)
If the script says "This script plans to use cyg_server, Do you want to use a different name? Answer no.
Thanks to David Spillett of Londdon, UK on the permission tips.
Thanks to Dave Lennert of Portland Oregon for the WIndows 7 tips.
When the script stops and asks you for "environment variable CYGWIN=" your answer is ntsec tty
See Note 25 near the end of this web page if you need to run ssh-host-config again.
Run "rebaseall" as desribed in http://www.acooke.org/cute/CygwinSSHS0.html
(6) While you are still in the (black) cygwin screen, start the sshd service, type
net start sshd
or
cygrunsrv –start sshd
Click here on how to stop the sshd service.
If the service fails to start, try (thanks to Ross Beveridge of HP for this tip)
chown system /etc/ssh*
chown system /var/empty or chown sshd_server /var/empty
net start sshd
If you get "ssh-exchange-identification: Connectiion closed by remote host" error.
edit the file /etc/hosts.allow and add these two lines
ALL: 127.0.0.1/32 : allow
ALL: [::1]/128: allow
before the PARANOID line. Thanks to Thomas Braun for the hosts.allow tips.
(7) Make sure every Windows user has a password set, if not,
go to g Control Panel….User Accounts and create a password.
(7a) Make sure every Windows user has done the following at least once:
Login in as the Windows user, pop a console command screen by clicking Start…Run….cmd
Thanks to Magno Corrêa of Brazil for the tip in (7a)
(8) important Pop a cygwin gwindow, harmonize Windows user information with cygwin, otherwise they cannot login
mkpasswd -cl > /etc/passwd
mkgroup –local > /etc/group
If your XP logs on to a domain, you most likely have to manually edit /etc/group. See this page.
If your local account name is the same as the domain name, then you would need to use Windows’s User admin function to
rename the loacal account from name to name.local
Then rebuild the passwd and group files as shown above, then edit the /etc/group file as shown above. Open firewall’s TCP port 22
(Thanks to Christopher Poda of Venturi Wireless, Sunnyvale, California)
If your XP logs on to a domain, you may want to edit /etc/passwd to replace /home/username by //unc_server/path_to_home
(thanks to Geoff Thomas)
mkpasswd creates a password file from Windows’ user list, click here for more details.
mkgroup creates a group file from Windows’ user list, click here for more details.
Thanks to John Skiggn of Cingular Wireless in Redmond, Washington for his tweak on domain user /etc/group
Test to see if sshd is working, pop a cygwin gwindow (note: the command below is case sensitive)
whoami
ssh localhost
or
ssh -vvv localhost
or
ssh "$USERNAME@127.0.0.1"
if ssh complains "The authenticity of host xx.xx.xx.xx can’t be established …. Are you sure you want to continue connecting (yes/no)?" Answer yes (Thanks to Daniel Griscom of Suitable Systems)
g If you get an error message like "ssh-exchange-identification: Connection closed by remote host",
it is probably caused by McAfee 8.0i, see this page about the fix. (Thanks to Ron Dozier of University of Delaware, USA)
Error is also related to /etc/hosts.allow file, see http://www.cygwin.com/ml/cygwin/2008-12/msg00678.html
g If you get an error message like "entry point _getreent", or "QuerryService Status: Win32 error 1062", it is probably
caused by the existance of an older version of "cygwin1.dll" located in the search path.
Do a full serarch of "cygwin1.dll" and remove the old version, except the current version at c:\cygwin\bin (Thanks to Joe britton)
If you get a prompt without error messages, type
cd /cygdrive/c
ls
if you see a directory listing, success! g g g
(type exit to end the cygwin ssh session)
Thanks to Roger Pack for his tips clarifying between Microsoft’s ls.exe (installed by MS compilers) and cygwin’s ls.exe
If you have a Windows username that contains space, expand the space into \ [space],
e.g. if the Windows login name is Mickey mouse
ssh Mickey\ mouse@127.0.0.1
If you have a Unix system that does not know what to do with TERM cygwin, add these scripts to .login
If you have troubles ssh into the server, try run ssh-user-config
[http://pigtail.net/LRP/printsrv/cygwin-sshd.html Pulled and unedited from here]

This site I found to be a excellent selection if anyone is hunting for answers to their everyday problems. For sure I will come back to check it out further