Automated merge with file:///d:\srv\hg-home\admin-doc
-*- mode: outline; coding: windows-1251 -*-* SSH server on cygwin. * ������������ ����������� ����� ������ Cygwin + ����� openssh. * ������������� ���������� ��������� CYGWIN=binmode tty ntsec. ��� ����� ������� ��������� ��� ����� cygwin.bat (������ ��� �������). set CYGWIN=binmode tty ntsec * ������� ������������ (XXX ��� ������� ����� ���� ������������ �� ��� ����������?), �������� � ������ user. * �������� /etc/passwd $ mkpasswd -l -u user >>/etc/passwd ��� $ mkpasswd -l >/etc/passwd ��� ���������� ���� �������. * � ����������� bash: $ mkdir -p /home/user $ ssh-host-config -y �������� ������: $ net start sshd ��� $ cygrunsrv -S sshd * �� ��������� ������ ���������: $ ssh 192.168.1.26 -l user * ���������� ������ $ cygrunsrv -E sshd** ��������� SSH server �� ������ ������������� ������������. * ������� ������������, �������� � ������ user, ������ ��� ������, ����� (�.�. � ����� ������ ����� �������) � �.�., ������������ �� ���������. * � ������� MMC ��������� �������� "��������� ������������.". ������������ ���������: "��������� ������������."->"��������� ��������."->"���������� ���� ������������." ->"���� � �������� ������."->�������� 'user'. "��������� ������������."->"��������� ��������."->"���������� ���� ������������." ->"��������� ��������� ����."->������� 'user' (���� ��� ����������). XXX "�������������� ��������� ����������."* SSH client.** SSH client on Windows.*** ssh from Cygwin. * ����������� openssh �� Cygwin. * � ����������� bash �������� $ ssh user@192.168.1.38 ��� $ ssh -l user 192.168.1.38* Reverse SSH TunnelingHave you ever wanted to ssh to your Linux box that sits behind NAT? Now you can withreverse SSH tunneling. This document will show you step by step how to set up reverse SSHtunneling. The reverse SSH tunneling should work fine with Unix like systems.Let's assume that Destination's IP is 192.168.20.55 (Linux box that you want to access).You want to access from Linux client with IP 138.47.99.99.Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99)SH from the destination to the source (with public ip) using command below: $ ssh -R 19999:localhost:22 sourceuser@138.47.99.99port 19999 can be any unused port.Now you can SSH from source to destination through SSH tuneling: $ ssh localhost -p 199993rd party servers can also access 192.168.20.55 through Destination (138.47.99.99).Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99) <- Bob's serverFrom Bob's server: $ ssh sourceuser@138.47.99.99After the sucessful login to Source: $ ssh localhost -p 19999The connection between destination and source must be alive at all time. Tip: you may runa command (e.g. watch, top) on Destination to keep the connection active.