.. _Configure ssh server - Windows 7: Windows 7 Client - Configure ssh server ======================================== On each client running Windows 7, we login as a local user with administrative rights. We do the following: * :ref:`Create a root account - Windows 7` * :ref:`Install ssh server - copssh - Windows 7` * :ref:`Setup firewall - Windows 7` .. raw:: latex \newpage % hard pagebreak at exactly this position .. _Create a root account - Windows 7: Windows 7 - Create a root account ---------------------------------- .. |image1a| replace:: image 1a .. _image1a: ../../../../_static/screenshots/en/local_network-win7-selectadminpc.png .. |image1b| replace:: image 1b .. _image1b: ../../../../_static/screenshots/en/local_network-win7-adminusers.png .. |image1c| replace:: image 1c .. _image1c: ../../../../_static/screenshots/en/local_network-win7-adduserroot.png .. |image1d| replace:: image 1d .. _image1d: ../../../../_static/screenshots/en/local_network-win7-userrootdelgroupusers.png .. |image1e| replace:: image 1e .. _image1e: ../../../../_static/screenshots/en/local_network-win7-userrootaddgroupAdministrators.png We create a local user account with administrative priviledges and username : **root** [c7]_ * We right click on **Computer** icon and select **Manage**. (|image1a|_) * On the left frame we go to **Computer Management (Local) / Local Users and Groups** and we click on **Users** folder. (|image1b|_) * From menus we select **Action / New User** * We type **root** as *Username*, and the *Password* we want. (|image1c|_) .. note:: Password for the **root user** must be rather difficult for security reasons. If we have dual-boot clients with Windows and Linux OS, we select the same password for the **root user** to both Linux and Windows OS. We use the same root password on all client PCs. * We **unselect** option *User must change password in next logon* and we **select** option *Password never expires*. (|image1c|_) We press **Create** button and then **Close**. * We right click on user **root** and we select **Properties** * In tab **Member Of**, we remove **Users** group. (|image1d|_) * We add **Administrators** group as following: In **root** user **Properties** window, in **Member Of** tab, we press **Add** button, next **Advanced** button and finally **Find now**. We select **Administrators** group and press OK consecutively in the following dialogs. (|image1e|_) .. tabularcolumns:: |p{160pt}|p{160pt}|p{160pt}| .. list-table:: :header-rows: 0 :widths: 200, 200, 200 :class: center * - .. image:: ../../../../_static/screenshots/en/local_network-win7-selectadminpc.png :width: 160pt :height: 100pt :alt: Select Manage Computer :target: ../../../../_static/screenshots/en/local_network-win7-selectadminpc.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-adminusers.png :width: 160pt :height: 100pt :alt: Admin Users :target: ../../../../_static/screenshots/en/local_network-win7-adminusers.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-adduserroot.png :width: 160pt :height: 100pt :alt: Add User root :target: ../../../../_static/screenshots/en/local_network-win7-adduserroot.png * - image 1a - image 1b - image 1c .. tabularcolumns:: |p{160pt}|p{160pt}| .. list-table:: :header-rows: 0 :widths: 200, 200 :class: center * - .. image:: ../../../../_static/screenshots/en/local_network-win7-userrootdelgroupusers.png :width: 160pt :height: 100pt :alt: Delete group Users :target: ../../../../_static/screenshots/en/local_network-win7-userrootdelgroupusers.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-userrootaddgroupAdministrators.png :width: 160pt :height: 100pt :alt: Add Group Administrators :target: ../../../../_static/screenshots/en/local_network-win7-userrootaddgroupAdministrators.png * - image 1d - image 1e .. raw:: latex \newpage % hard pagebreak at exactly this position .. _Install ssh server - copssh - Windows 7: Windows 7 - Install ssh server - copssh ---------------------------------------- .. |image2a| replace:: image 2a .. _image2a: ../../../../_static/screenshots/en/local_network-win7-lserverpublicfolderlogin.png .. |image2b| replace:: image 2b .. _image2b: ../../../../_static/screenshots/en/local_network-win7-copsshinstall.png .. |image2c| replace:: image 2c .. _image2c: ../../../../_static/screenshots/local_network-winxp-copsshactivateuser.png **Copssh** is an ssh server, based on cygwin, that can be setup very easily. To install **Copssh** we do the following: * We click on **Computer** or **Network** icon. In **Address** field, we fill the hostname or ip address of the server followed by the **public** network folder - e.g. \\\\lserver\\public or \\\\192.168.10.200\\public. (We have already setup a hostname and a local network ip for the server in LServerAdmin *Network Configuration* menu). We login with username **user** [BE]_ [c8]_ or **teacher** [SE]_ [c9]_ selecting **Remember my credentials** box. (|image2a|_) * From **public** network folder, we right click on **Copssh_3.1.4_Installer** and select **Run As Administrator** (we maybe asked again for our password in public folder). We proceed with installation until it finishes. [c10]_ (|image2b|_) * From **Startup / All Programs / copssh**, we right click **Activate a User** and select **Run As Administrator**. In User field we **select** user : *root*. We **unselect** *Create Keys for public key authentication* and press next to activate user root for remote ssh access. (|image2c|_) .. tabularcolumns:: |p{160pt}|p{160pt}|p{160pt}| .. list-table:: :header-rows: 0 :widths: 200, 200, 200 :class: center * - .. image:: ../../../../_static/screenshots/en/local_network-win7-lserverpublicfolderlogin.png :width: 160pt :height: 100pt :alt: Public folder login :target: ../../../../_static/screenshots/en/local_network-win7-lserverpublicfolderlogin.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-copsshinstall.png :width: 160pt :height: 100pt :alt: CopSSH install :target: ../../../../_static/screenshots/en/local_network-win7-copsshinstall.png - .. image:: ../../../../_static/screenshots/local_network-winxp-copsshactivateuser.png :width: 160pt :height: 100pt :alt: CopSSH activate user :target: ../../../../_static/screenshots/local_network-winxp-copsshactivateuser.png * - image 2a - image 2b - image 2c .. raw:: latex \newpage % hard pagebreak at exactly this position .. _Setup Firewall - Windows 7: Windows 7 - Setup Firewall --------------------------- .. |image3a| replace:: image 3a .. _image3a: ../../../../_static/screenshots/en/local_network-win7-firewallsettings.png .. |image3b| replace:: image 3b .. _image3b: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-newrule.png .. |image3c| replace:: image 3c .. _image3c: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-addsshport.png .. |image3d| replace:: image 3d .. _image3d: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-enableworkprofile.png .. |image3e| replace:: image 3e .. _image3e: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-sharedfolders.png To setup firewall to allow remote ssh connections we do the following : * We go **Startup / Control Panel / System and Security / Windows Firewall**.(|image3a|_) * From left pane, we select **Advanced settings**. In **Windows Firewall with Advanced Security** window, we select **Inbound Rules**, from the left frame. From the menus we click on **Action / New Rule**. * This starts **New Inbound Rule Wizard**. We select **Port** as *Rule Type*. (|image3b|_) * We select *Specific local Ports* : **22** and *Protocol* : **TCP**. (|image3c|_) * On *Action*, we select **Allow the connection**. On *Profile*, we select **Domain**, **Private**, to allow local network ssh connections. We can unselect **Public**, for security, but we need to remember our choice [c14]_. Finally for Rule *Name* we select **ssh** and press *Finish*. We have opened ssh port from Windows Firewall. One last step is to enable **File and Printer Sharing**. [c11]_ * We go **Startup / Control Panel / Network and Internet / Network and Sharing Center**. We ensure **Work or Home** Network Profile is active. [c14]_ (|image3d|_) * From left pane we select, **change advanced sharing settings**. We select **Home or Work** Profile. We check **Turn on network discovery**, **Turn on file and printer sharing**, and leave other options as they are. (|image3e|_). If we want to enable file and printer sharing in **Public** Profile also, we unhide it, and check the same options as in **Home or Work** Profile. [c14]_ To finish configuring ssh access, we must restart the client PC. .. tabularcolumns:: |p{160pt}|p{160pt}|p{160pt}| .. list-table:: :header-rows: 0 :widths: 200, 200, 200 :class: center * - .. image:: ../../../../_static/screenshots/en/local_network-win7-firewallsettings.png :width: 160pt :height: 100pt :alt: Firewall Settings :target: ../../../../_static/screenshots/en/local_network-win7-firewallsettings.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-newrule.png :width: 160pt :height: 100pt :alt: Firewall Settings - New Inbound rule :target: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-newrule.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-addsshport.png :width: 160pt :height: 100pt :alt: Firewall Settings - Add ssh port :target: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-addsshport.png * - image 3a - image 3b - image 3c .. tabularcolumns:: |p{160pt}|p{160pt}| .. list-table:: :header-rows: 0 :widths: 200, 200 :class: center * - .. image:: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-enableworkprofile.png :width: 160pt :height: 100pt :alt: Enable work Profile :target: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-enableworkprofile.png - .. image:: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-sharedfolders.png :width: 160pt :height: 100pt :alt: Shared Folders :target: ../../../../_static/screenshots/en/local_network-win7-firewallsettings-sharedfolders.png * - image 3d - image 3e .. raw:: latex \newpage % hard pagebreak at exactly this position