<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://techwiki.neosys.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nikhil</id>
	<title>NEOSYS Technical Support Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://techwiki.neosys.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nikhil"/>
	<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php/Special:Contributions/Nikhil"/>
	<updated>2026-06-13T02:44:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1876</id>
		<title>Implementing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1876"/>
		<updated>2014-12-07T08:38:34Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Set up the System Configuration File==&lt;br /&gt;
See [http://userwiki.neosys.com/index.php/System_Configuration_File System Configuration File] for detailed description. The following points are essential configuration and must not be ignored.&lt;br /&gt;
&lt;br /&gt;
*All configurations must be carefully done after evaluating which [http://userwiki.neosys.com/index.php/System_Configuration_File#Scope Scope] they fall under.&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#System_ID System ID] and User Timezone&lt;br /&gt;
*Set up [http://userwiki.neosys.com/index.php/System_Configuration_File#General Email Domains] and [http://userwiki.neosys.com/index.php/System_Configuration_File#General IP Numbers]&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#Web_Address_and_Description URL/Web Address] to access NEOSYS. This is very important for a Timesheet module installation as the approver links are picked up from the configuration. &lt;br /&gt;
&lt;br /&gt;
==Update Support.htm==&lt;br /&gt;
Add the new client to the list of clients page.&lt;br /&gt;
&lt;br /&gt;
See [http://itwiki.neosys.com/index.php/Updating_Support.htm Updating Support.htm]&lt;br /&gt;
&lt;br /&gt;
==Setting up a new company in the new database==&lt;br /&gt;
Refer to the [http://userwiki.neosys.com/index.php/Setting_up_multi_company_installations_/_Setting_up_a_new_company#Draft_email_requesting_info_required_to_add_new_company_to_existing_database sample email for New Company creation in existing Database/New Database] &lt;br /&gt;
&lt;br /&gt;
Once the new company is added to the database:&lt;br /&gt;
#Delete Startup Company from the list of companies in the database. To delete Startup company see [[Configuring_NEOSYS_Finance_System#How_to_delete_a_company_from_the_dataset.3F|How to delete a company]]&#039;&#039;&#039;&lt;br /&gt;
#Delete “Client X” from the Client and Brand File&lt;br /&gt;
&lt;br /&gt;
Change the system mark for each of the new databases that were created. See [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Configuring_Client_Security_mark Configuring System Mark]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Installing_NEOSYS&amp;diff=1875</id>
		<title>Installing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Installing_NEOSYS&amp;diff=1875"/>
		<updated>2014-12-07T08:03:12Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Technical / Hardware requirements]]&lt;br /&gt;
&lt;br /&gt;
[[Preliminary Check-list and other Misc items]]&lt;br /&gt;
&lt;br /&gt;
[[Setting up TCP/IP filtering|Setting up TCP/IP filtering (for Windows Server 2003)]]&lt;br /&gt;
&lt;br /&gt;
[[Setting up Windows Firewall|Setting up Windows Firewall (for Windows Server 2008)]]&lt;br /&gt;
&lt;br /&gt;
[[Setting up and using remote support]]&lt;br /&gt;
&lt;br /&gt;
[[Installing NEOSYS Service]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring Antivirus for NEOSYS]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring IIS]]&lt;br /&gt;
&lt;br /&gt;
[[Setting up Dynsite / Dynamic IP update client]]&lt;br /&gt;
&lt;br /&gt;
[[Setting up HTTPS]]&lt;br /&gt;
&lt;br /&gt;
[[Benchmarking NEOSYS]]&lt;br /&gt;
&lt;br /&gt;
[[Installing IE7 &amp;amp; IE8 Download Blocker]] ** not required for Windows 2008&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Configuring NEOSYS automated backup|Configuring NEOSYS automated backup]]&lt;br /&gt;
&lt;br /&gt;
[[Installing EMS Magic]]&lt;br /&gt;
&lt;br /&gt;
[[Establishing Emergency Support Procedures]]&lt;br /&gt;
&lt;br /&gt;
[[Setting up for non-latin characters]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring and Administering Multi-site Installations]]&lt;br /&gt;
&lt;br /&gt;
[[Installing on Windows 7]]&lt;br /&gt;
&lt;br /&gt;
[[Restricting usage of NEOSYS to licence period]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring NEOSYS for various language character sets]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring NEOSYS to display local time]]&lt;br /&gt;
&lt;br /&gt;
[[Implementing NEOSYS]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Procedures&amp;diff=1873</id>
		<title>Procedures</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Procedures&amp;diff=1873"/>
		<updated>2014-12-07T07:29:29Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Documenting Processes in Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are procedures to be followed by Support Staff in respect to various technical matters in day to day operations of client issues.&lt;br /&gt;
&lt;br /&gt;
== Handling Clients with Overdue Invoice ==&lt;br /&gt;
In order to maintain good payment speed by clients NEOSYS needs to restrict support to clients that dont pay their bills on time, however the degree of restriction needs to depend on an intimate knowledge of the client which cannot be expected from all NEOSYS support staff. Therefore we will use a simple escalation policy as follows:&lt;br /&gt;
&lt;br /&gt;
=== Overdue Support List ===&lt;br /&gt;
NEOSYS SUPPORT MANAGERS WILL maintain an overdue list on a whiteboard visible to all support staff. Generally clients will go on the list immediately when their invoice is overdue and come off only after satisfactory commitment to pay have been obtained.&lt;br /&gt;
&lt;br /&gt;
NEOSYS SUPPORT STAFF WILL discretely refer any calls for support from client on the overdue list to support managers for handling.&lt;br /&gt;
&lt;br /&gt;
Managers may well instruct support to provide support on a case by case basis even if clients are on the overdue list. Being on the overdue list does not necessarily indicate a major issue with accounts&lt;br /&gt;
&lt;br /&gt;
In case clients pressurize NEOSYS staff to provide support then the support staff must inform them that there is an issue with their account and that their request had been forwarded to the manager.&lt;br /&gt;
&lt;br /&gt;
For the first week only of each quarter of the year, normal support should be provided for server failures and backup failures but nothing else.&lt;br /&gt;
&lt;br /&gt;
== Handling Links and Email Attachments ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DO NOT TRUST ANY LINK OR ATTACHMENT IN ANY EMAIL EVEN FROM HIGHLY TRUSTED PEOPLE OR ORGANISATIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These days you can no longer trust links or attachments in emails from anybody - even emails from highly trusted people like your bank.&lt;br /&gt;
&lt;br /&gt;
If a personal computer or intermediate email server is hacked then even genuine emails sent out from it can be infected and modified in a hidden way that can result in the recipient being infected if they click or open anything in the email.&lt;br /&gt;
&lt;br /&gt;
Therefore you should know and understand how to avoid, as far as possible, getting tricked and infected via emails.&lt;br /&gt;
&lt;br /&gt;
Malware authors generally rely on the fact that most people devote no time at all to security precautions so a moderate cautious approach, slowing down a little to spending some time on security, even where it is apparently not required, is enough to defeat most attacks.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The links in an email, even from someone you know and trust, can LIE to you about what website they will open and you may be taken to infected web sites that will attempt to infect your computer.&lt;br /&gt;
&lt;br /&gt;
WHAT LINK/WEBSITE WILL BE OPENED MAY NOT BE WHAT IS SAYS IN THE BODY OF YOUR EMAIL!&lt;br /&gt;
&lt;br /&gt;
Therefore, to use a link in any and all emails, first hover your cursor over it and check the bottom of the screen where you can usually see exactly what website will be opened, or, to be more sure exactly what web site you are opening do not click links in emails at all. COPY/PASTE THE LINK TO YOUR BROWSER&lt;br /&gt;
&lt;br /&gt;
Make sure you know and trust the web site being opened.&lt;br /&gt;
&lt;br /&gt;
#Carefully inspect the spelling of the domain name to avoid tricky look-alike fraudulent links eg hcsb.com instead of hsbc.com&lt;br /&gt;
#If you do not personally know the website then get independent confirmation from the sender. Reply to the email so that the sender can check the link you received has not been tampered with.&lt;br /&gt;
&lt;br /&gt;
=== Attachments ===&lt;br /&gt;
&lt;br /&gt;
There is no way to determine if an attachment, even from someone you know, has not been infected and is therefore dangerous. The only protection is to rely on anti-virus/anti-malware software in your computer.&lt;br /&gt;
&lt;br /&gt;
You can check the names and file types/extensions of attached files to spot any obviously strange or unexpected attachments but this is not very effective.&lt;br /&gt;
&lt;br /&gt;
Be careful that if there are a lot of attached files not to assume that all are safe because the majority are unsafe.&lt;br /&gt;
&lt;br /&gt;
==Client Contact Report Policy==&lt;br /&gt;
&lt;br /&gt;
Ensure that Client contact reports are sent to your manager within 24 hours of the meeting. &lt;br /&gt;
&lt;br /&gt;
== Client Communications ==&lt;br /&gt;
&lt;br /&gt;
Support staff must inform clients of the progress of the issue if it is not resolved the same day.&lt;br /&gt;
&lt;br /&gt;
If issues become contentious then voice, phone call or chat is REQUIRED. Emails are NOT sufficient.&lt;br /&gt;
&lt;br /&gt;
If not possible to contact for any reason then an email MUST be sent stating so and suggesting or requesting a time to connect.&lt;br /&gt;
&lt;br /&gt;
Every significant voice, phone or chat conversation MUST be followed up with an email confirming at least the jist of the communication.&lt;br /&gt;
&lt;br /&gt;
cc Client managers (AND/OR BCC NEOSYS Managers) MAY be done if thought to be useful and/or appropriate.&lt;br /&gt;
&lt;br /&gt;
== Client Password Policy ==&lt;br /&gt;
All client user passwords, including their initial one, are to be obtained via the user&#039;s email address using the password reminder/reset button on the login screen. [http://userwiki.neosys.com/index.php/Using_NEOSYS_Generally#What_is_NEOSYS_password_policy.3F  (NEOSYS password policy)]&lt;br /&gt;
&lt;br /&gt;
NEOSYS staff should never know users passwords therefore NEOSYS will not obtain and grant user passwords. The reason for this is that in the event that users lose their passwords to other people who then login unauthorised then suspicion could fall on the NEOSYS staff who know their password. &lt;br /&gt;
&lt;br /&gt;
All parties concerned, including client management, client users and NEOSYS support staff, benefit greatly from trusting that if something in a NEOSYS database is registered as having been done by a particular user then it was not in fact somehow done by NEOSYS support staff. Nothing should be done that would break such fundamental trust. To achieve this, NEOSYS support staff must never log in as particular users, never ask for users passwords and generally enforce the idea that all work logged as being done by users IS done by users.&lt;br /&gt;
&lt;br /&gt;
Very limited amounts of work by NEOSYS support staff either in person or remotely using teamviewer is acceptable while a user is logged as long as the user login was performed by the user themselves, the user is present and the user specifically agrees with the work being done.&lt;br /&gt;
&lt;br /&gt;
=== Support requests from ordinary client users ===&lt;br /&gt;
Any support requests concerning inability to obtain passwords will be forwarded to known skilled users on the client staff since this is the most efficient (not fastest) way to handle such issues.&lt;br /&gt;
&lt;br /&gt;
=== Support requests from senior client management ===&lt;br /&gt;
Any support requests concerning inability to obtain passwords by senior client management users shall be handled directly by NEOSYS support staff in any way convenient to resolve the issue in the quickest possible time rather than the most efficient.&lt;br /&gt;
&lt;br /&gt;
Bearing in mind that NEOSYS staff should never know user&#039;s passwords this will probably involve NEOSYS staff using the Password Reminder/Reset button to send a new password to the user.&lt;br /&gt;
&lt;br /&gt;
=== User Defined Passwords ===&lt;br /&gt;
NEOSYS will provide user defined passwords in very special cases which must be pre-approved case by case by NEOSYS management. NEOSYS will not approve this due to the reasons mentioned [[Procedures#Client_Password_Policy|here]].&lt;br /&gt;
&lt;br /&gt;
Currently this permission has only been granted to one NEOSYS client with several hundred of databases.&lt;br /&gt;
&lt;br /&gt;
== Handling client issues and requests==&lt;br /&gt;
&lt;br /&gt;
All support issues must be dealt with through phone/email/chat. Support Staff can schedule client visits for User Training but should not schedule client visits solely for providing support for petty issues. &lt;br /&gt;
&lt;br /&gt;
=== Handling users who login with other people&#039;s NEOSYS usercodes ===&lt;br /&gt;
&lt;br /&gt;
This can cause a lot of confusion in both the client and NEOSYS support. It may also indicate that the correct NEOSYS monthly licensing fee is not being paid. There is no valid reason for anonymous logins or sharing logins between multiple users.&lt;br /&gt;
&lt;br /&gt;
Therefore if NEOSYS support team get requests for support about using NEOSYS from users who are not registered properly in NEOSYS with an personally identifiable user code, name and email then the following email should be sent cc admin@neosys.com.&lt;br /&gt;
&lt;br /&gt;
No exception should be granted to clients without NEOSYS management approval.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear NEOSYSUSER,&lt;br /&gt;
&lt;br /&gt;
Please note that in order to receive support from NEOSYS you must personally have an identifiable user code, name and email address registered&lt;br /&gt;
in NEOSYS.&lt;br /&gt;
&lt;br /&gt;
We can create new user account for you with your management approval. This may or may not have an impact on the NEOSYS monthly licensing fee &lt;br /&gt;
depending on the agreement in force.&lt;br /&gt;
&lt;br /&gt;
Please let us know what you would like us to do.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
NEOSYS Support&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Handling emails requesting support===&lt;br /&gt;
At times, clients forward old emails, with new issues or do not bother putting the correct subject line for new issues. In such situations, support should fix their email by deleting the irrelevant content and changing the subject and add a comment like &amp;quot;PS Please don&#039;t forward old emails for new issues, either start a new email or delete previous content and put a new subject.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Handling Requests to do Client work ===&lt;br /&gt;
NEOSYS Support staff must not agree or offer to do work on behalf of the client. &lt;br /&gt;
&lt;br /&gt;
This is because doing client work while logged in as NEOSYS breaks security rules. Support uses the NEOSYS username which has unrestricted access, so when a user requests Support to do some work which they don’t have access to, and if Support agrees to do the work, the client has successfully defeated the security rules by accessing features that they are unauthorized to access.&lt;br /&gt;
&lt;br /&gt;
=== Updating Clients about unresolved issues ===&lt;br /&gt;
Support should proactively inform clients if an issue is not solved within the same day it was raised, after judging the urgency of the issue and the time it was raised. An email to the client who raised the issue, before the end of each day, is a best practice that keeps the client updated and other support staff too. This email should be sent regardless of the degree to which the issue has been resolved or if the issue is unresolved. If the issue is unresolved, the email should explain why and also explain the cause of delay.&lt;br /&gt;
&lt;br /&gt;
=== Handling new USER creation ===&lt;br /&gt;
Support staff should create new USERS for clients when requested by authorised person. Clients should not be discouraged to create new users. User statistic is reviewed periodically and clients are billed as per user usage. Over time old USERS are replaced with new USERS. The USER code is the first name of a user.&lt;br /&gt;
&lt;br /&gt;
New user requirements :- &lt;br /&gt;
#Full name&lt;br /&gt;
#Email address&lt;br /&gt;
#Group level / User with similar authorisation.&lt;br /&gt;
&lt;br /&gt;
=== Handling letterhead change requests ===&lt;br /&gt;
&lt;br /&gt;
Support staff should reject any requests that requires the letterhead to be setup on the TESTING dataset before it is setup in the MAIN dataset.This is to reduce double work for support staff and to ensure that clients have a clear understanding of their requirements and also send the correct logo image.&lt;br /&gt;
The MAIN dataset can be copied to the TEST dataset for any kind of testing. &lt;br /&gt;
&lt;br /&gt;
=== Handling error messages ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before Attempting to resolve client issues, please ensure that we have secure access to the NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
#The very first step is understanding client problem.&lt;br /&gt;
#Ask the client what error does he gets on the screen.&lt;br /&gt;
#If error seems to be familiar then resolve it over the phone.&lt;br /&gt;
#If error is unknown then ask user to send a screenshot of the error displayed along with the options used (basically you need to know HOW to replicate the error)&lt;br /&gt;
#Upon receipt of the error, check in all the wikis for a solution.&lt;br /&gt;
#If the issue is unknown or you don’t understand it clearly ask the user then use remote support to gain access to the users desktop to view how to replicate the error. &lt;br /&gt;
&lt;br /&gt;
If it is new issue then report by escalation the same issue to your manager with a brief explanation.&lt;br /&gt;
&lt;br /&gt;
=== Addressing Technical support emails ===&lt;br /&gt;
&lt;br /&gt;
In the case of technical support issues, address emails to the IT person and cc the complete group of recipients of backup emails and other NEOSYS alert emails. This allows both NEOSYS and client IT staff to take credit for resolving issues that NEOSYS raises instead of working in the background unacknowledged.&lt;br /&gt;
&lt;br /&gt;
Technical support issues include backup failure, server failure, missing alert email, server connectivity issues and port forwarding issues and many other issues.&lt;br /&gt;
&lt;br /&gt;
=== Acceptable report format when handling issues in NEOSYS reports ===&lt;br /&gt;
&lt;br /&gt;
NEOSYS Support must only resolve issues in NEOSYS output first. This is because only NEOSYS outputs can be trusted and user versions in Excel or PDF could be copied wrongly or edited by the user.&lt;br /&gt;
&lt;br /&gt;
In case users send reports in excel or other formats, get them to send the original NEOSYS HTML report as an attachment or copy-pasted in email.&lt;br /&gt;
 &lt;br /&gt;
=== Handling issues with totals on reports ===&lt;br /&gt;
&lt;br /&gt;
If a client has a problem with any total output by NEOSYS software then NEOSYS support will advise them which other NEOSYS report or reports provide a complete breakdown of the total (if necessary, to individual transactions) and ask the client to locate any offending transactions themselves.&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff will handle any issues where the total on the breakdown report does not add up to the total on the summary report.&lt;br /&gt;
&lt;br /&gt;
Reconciling totals can be hard if there are many transactions involved. Regardless of how hard it may be, reconciliation is an operational task for users not for support staff since NEOSYS support staff will not get involved in understanding client transactions or data.&lt;br /&gt;
&lt;br /&gt;
==== Trial Balance and Financial Statements ====&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff do not have to prove or trace any figures in NEOSYS Trial Balance Reports or any financial reports. If a figure is stated to be wrong by the user, then NEOSYS support staff should ask for proof or say NEOSYS is confident that the figures are correct unless proved otherwise. &lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff should point out reports in NEOSYS which will support the figures in question but not actually run the reports. Support staff can suggest the users to refer to detailed ledger accounts to prove balances.&lt;br /&gt;
&lt;br /&gt;
==Handling Browser related issues in NEOSYS==&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Technical_/_Hardware_requirements#NEOSYS_Software_Browser_and_OS_Requirements NEOSYS browser requirements]&lt;br /&gt;
&lt;br /&gt;
Clients frequently ask [http://userwiki.neosys.com/index.php/General_FAQ#Why_doesnt_NEOSYS_support_my_XYZ_browser.3F Why NEOSYS doesn&#039;t support other browsers] &lt;br /&gt;
&lt;br /&gt;
To avoid browser errors, all new users must follow the steps given in [http://userwiki.neosys.com/index.php/Using_NEOSYS_Generally#Getting_started_with_NEOSYS Getting started with NEOSYS] before logging in to NEOSYS for the first time.&lt;br /&gt;
&lt;br /&gt;
To troubleshoot browser related errors see [http://userwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Troubleshooting_Web_Browsers Troubleshooting Web Browsers]&lt;br /&gt;
&lt;br /&gt;
Users must clear browser cache after every NEOSYS Upgrade to avoid errors. See [http://techwiki.neosys.com/index.php/Upgrading_NEOSYS#Sample_email_to_be_sent_to_clients_who_face_issues_due_to_failure_in_clearing_browser_cache Sample email to clients who face issues due to failure in clearing browser cache]&lt;br /&gt;
&lt;br /&gt;
Pop-up blockers and any 3rd party toolbars must be deactivated/switched off or else certain pages and alert messages while using NEOSYS do not appear as a result of blocking from either the pop-up blocker or toolbars with built-in pop-up blockers. &lt;br /&gt;
&lt;br /&gt;
NEOSYS support should ask users to Reset browser (See [http://userwiki.neosys.com/index.php/Reset_Browser Reset browser]) if they notice any user browsers which have pop-up blockers or 3rd party toolbars installed.&lt;br /&gt;
&lt;br /&gt;
NEOSYS Support should additionally ensure that under Internet Explorer &amp;gt; Tools &amp;gt; Internet Options &amp;gt; Advanced &amp;gt; Browsing - the items Disable script debugging (Internet Explorer) and Disable script debugging (Other) are &#039;&#039;&#039;UNTICKED&#039;&#039;&#039;. This is because if NEOSYS generates any javascript error message, the same would disappear in the bottom left corner of a window, which in turn helps the programmer fix the error. This must be done after every Factory Reset.&lt;br /&gt;
&lt;br /&gt;
== Handling NEOSYS Upgrade==&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Upgrading_NEOSYS Upgrading NEOSYS]&lt;br /&gt;
&lt;br /&gt;
== Using Support Tools ==&lt;br /&gt;
=== Website Live Support ===&lt;br /&gt;
www.neosys.com is equipped with a Live Support software and clients can visit the website, click on this link and chat with any of our support staff, without the need for any installation. The client has to fill in their name and email address to connect to an available support personnel. During non-working hours, the Live Support icon on the website automatically displays &amp;quot;offline&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
NEOSYS Support personnel who are authorised to provide such support, need to download a software called Kayako Live Support from the link below&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/LiveResponse_3.1.1.122-STABLE.exe&lt;br /&gt;
&lt;br /&gt;
Once downloaded the account needs to be setup as follows:&lt;br /&gt;
&lt;br /&gt;
* Account Name: (as provided by NEOSYS IT)&lt;br /&gt;
* SupportSuite URL: http://support.neosys.com/&lt;br /&gt;
* User Name: (as provided by NEOSYS IT and usually same as Account Name)&lt;br /&gt;
* Password: (as provided by NEOSYS IT)&lt;br /&gt;
&lt;br /&gt;
The first time the account is setup, you need to close Kayako Live Support completely and restart for it to log in and work properly.&lt;br /&gt;
&lt;br /&gt;
=== Teamviewer ===&lt;br /&gt;
Since Teamviewer allows no restriction on access once a fixed pass is installed, Support must not install fixed pass on teamviewer however convenient it might be.&lt;br /&gt;
&lt;br /&gt;
RULE: NO FIXED PASS TO BE INSTALLED ON TEAMVIEWER IN ANY NEOSYS OR NEOSYS CLIENT COMPUTER&lt;br /&gt;
&lt;br /&gt;
Running teamviewer live from a web link is fine because it does not allow installation of a permanent password&lt;br /&gt;
&lt;br /&gt;
For certain tasks that require temporary install of Teamviewer on the client servers (e.g. upgrading Cygwin remotely), use Teamviewer 7 on the server as well as Support staff computer. Contact NEOSYS IT for commercial license of Teamviewer 7. &lt;br /&gt;
&lt;br /&gt;
To support client users who use the latest version of Teamviewer, support staff must also install the latest Teamviewer version available alongside Teamviewer 7.&lt;br /&gt;
&lt;br /&gt;
== Documenting Processes in Wiki ==&lt;br /&gt;
NEOSYS Support staff must be in continual learning mode. This is mandatory for support staff and is not an option. Support must read, learn and understand everything in the support emails and ask questions if they don&#039;t understand. This understanding must be transferred into wiki in the form of new articles and improvements to existing articles.&lt;br /&gt;
&lt;br /&gt;
For all articles related to formatting and editing in Wiki, see [http://itwiki.neosys.com/index.php/Documenting_NEOSYS_systems Documenting NEOSYS systems]&lt;br /&gt;
&lt;br /&gt;
===Avoiding duplication of text in wiki===&lt;br /&gt;
&lt;br /&gt;
Duplication of text in wiki is to be avoided almost at any cost. Duplication has the problem that when one copy is changed or improved in future then it is highly likely the editor will fail to update the other copy or copies and wiki will over time become an inconsistent mess.&lt;br /&gt;
&lt;br /&gt;
There are several ways to avoid duplication:&lt;br /&gt;
&lt;br /&gt;
#Two or more procedures which have significant areas of duplication can be rewritten as a single procedure with alternatives in the middle of the procedure&lt;br /&gt;
#Wiki Templates- Templates reproduce the same text in all places and editing one place edits all places. See [[How to create templates in wiki]]&lt;br /&gt;
#Wiki links- Only put the text in one place and put links to that in all the other places that it is appropriate.&lt;br /&gt;
#Place a note in all copies something to the effect that &amp;quot;This is similar to x, y and z&amp;quot;. This alerts any future editor of all other places in wiki that might also have to be updated.&lt;br /&gt;
&lt;br /&gt;
Future modifications in one place may or may not be appropriate to other places. The editor must decide whether to change one or all places&lt;br /&gt;
&lt;br /&gt;
== Use of personal email addresses by NEOSYS support staff ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff MUST NOT use any personal email addresses for NEOSYS business. &lt;br /&gt;
&lt;br /&gt;
The xxxx.neosys@gmail.com addresses that are created by support staff for themselves on joining are also considered personal email addresses and must not be used for NEOSYS business. These email addresses might be linked to NEOSYS wiki accounts but that doesn&#039;t matter because wiki is not confidential.&lt;br /&gt;
&lt;br /&gt;
== Accessing NEOSYS accounts on personal devices ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS staff MUST NOT install NEOSYS accounts on skype/dropbox/gmail (or any other external tool) on their personal devices without written permission from NEOSYS management&lt;br /&gt;
&lt;br /&gt;
== Support Staff work-in-progress documents/files ==&lt;br /&gt;
&lt;br /&gt;
Support Staff must not save working files hidden on their computer. Work that is not visible is not work .&lt;br /&gt;
Support work should not be done privately and should be shared to all.&lt;br /&gt;
&lt;br /&gt;
ALL personal working files however trivial MUST be stored in Dropbox and MUST NOT be stored anywhere in personal computer (My Documents/Desktop etc.)&lt;br /&gt;
&lt;br /&gt;
The personal encrypted pass file MUST be stored somewhere in personal computer (e.g. My Documents/Desktop etc.) and MUST NOT be stored in Dropbox.&lt;br /&gt;
&lt;br /&gt;
== Handling Nagios Client Monitoring system ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff on duty has to follow the below outlined procedures in case of any Nagios items showing a critical or warning message for any service. Failure to schedule appropriate downtime will lead to REDUNDANT ALERTS from NAGIOS every hour.&lt;br /&gt;
 &lt;br /&gt;
# Nagios is required to be checked first thing in the morning and any critical or warning messages need to be dealt with to resolve the same at the earliest. &lt;br /&gt;
# Some of the messages could be related to backup failures and the usual procedure as stated in [[Backup_and_Restore#Handling_failure_and_warning_messages_on_nightly_backup_alerts|Handling failure and warning messages on nightly backup alerts]] needs to be followed. In case the backup issue isn&#039;t resolved by 9:30 am, the Nagios service needs to be scheduled with downtime for a minimum of 2 hours and maximum until 1 am next day if the issue cannot be solved. &lt;br /&gt;
# In case any HTTPS, SSH, PING service or Host is down, immediate action is required and the relevant IT people at the client side needs to be contacted to get this resolved. A downtime of 2 hours is required to be scheduled with further intervals of 2 hours incase this is not resolved. Support staff shouldn&#039;t schedule downtime till 1 am next day, just to get rid of the alerts for the day. Proactive follow up with the client is required to get this resolved before the business day - more so, if there is a weekend ahead.&lt;br /&gt;
# In case the HTTPS, SSH, PING service or Host goes down during the day, a grace period of 20 minutes is given before the issue is reported to the client IT. This helps incase there is any temporary internet connection issue at the client or along the internet route.&lt;br /&gt;
# In case of &amp;quot;Backup not changed&amp;quot; warning status which occurs if the client has not interchanged the USB before 12 noon on that day, no action is required from the support staff and a downtime until 1 am next day needs to be scheduled.&lt;br /&gt;
# In case the HTTPS, SSH PING service or Host is down for more than 1 day, client IT should acknowledge the problem and give NEOSYS support staff an approximate time frame before which the issue will be resolved. Set an appropriate downtime for such events.&lt;br /&gt;
# In case Host is down for more than 2 days and there is no progress with the fix from client IT, the client management should be notified about the seriousness of not having access to server and their acknowledgement is mandatory.&lt;br /&gt;
&lt;br /&gt;
== Handling lack of remote access to NEOSYS server located in client’s premises ==&lt;br /&gt;
&lt;br /&gt;
If access to the NEOSYS server is lost then we must determine the root cause by: &lt;br /&gt;
# Checking if the server is UP and running&lt;br /&gt;
# If yes, please check internet connectivity on the server&lt;br /&gt;
# If there is connectivity, please check the router for connectivity issues&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Response:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
Please note that we have currently lost access to the NEOSYS server. The server seems to be down at the moment and it seems that &lt;br /&gt;
NEOSYS processes are not running on the server.&lt;br /&gt;
Kindly check if the server is UP and running. If yes, please check internet connectivity on the server.&lt;br /&gt;
Do keep us posted on the server status so we can test connectivity from our side as well.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== New Router (Port Forwarding) ==&lt;br /&gt;
&lt;br /&gt;
If you have changed your router then you may notice that external access to NEOSYS is unavailable. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setup a permanent access for NEOSYS by reconfiguring the Router / Firewall for Port Forwarding from Router to the NEOSYS Server as follows: &lt;br /&gt;
# Port 19580 &amp;gt; 19580 for SSH &lt;br /&gt;
# Port 4430 &amp;gt; 4430 for HTTPS&lt;br /&gt;
&lt;br /&gt;
You can see [http://portforward.com/ Set Up Port Forwarding] to learn how to configure your Router.&lt;br /&gt;
&lt;br /&gt;
To see how to test/ troubleshoot port forwarding settings, go to [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting Port Forwarding]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Response:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
You are requested to kindly setup a permanent access for NEOSYS by reconfiguring the Router / Firewall for Port Forwarding from Router to &lt;br /&gt;
the NEOSYS Server,i.e.  port 19580 for SSH and port 4430 for HTTPS.&lt;br /&gt;
&lt;br /&gt;
Once this is complete, kindly send me an email to confirm the same so that we could test connectivity from our end as well.&lt;br /&gt;
&lt;br /&gt;
Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Creating and Handling passwords ==&lt;br /&gt;
Passwords made out of a pass phrase should be at least 10 characters since using initials results in a lot of i&#039;s and a&#039;s etc which reduces the effectiveness of the password and allows hacking via brute force guessing especially since windows doesnt slow down logins even if it sees thousands of password attempts.&lt;br /&gt;
&lt;br /&gt;
=== Creating a password ===&lt;br /&gt;
Passwords are generated from a pass phrase and it is important to create a very difficult to guess pass phrase.&lt;br /&gt;
&lt;br /&gt;
For example, a good pass phrase would be: &#039;&#039;&#039;Today is a good day and it is the best time to go for a holiday&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The password for this would be &#039;&#039;&#039;Tiagdaiitbt2g4ah&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The important instructions for the above are:&lt;br /&gt;
#You have to take the first letter of each word and that makes your password (i.e. by using initials)&lt;br /&gt;
#Wherever any word starts with a capital, then you have to take first letter as a capital (eg. For Today you will take T)&lt;br /&gt;
#Replace &#039;&#039;&#039;and&#039;&#039;&#039; with &#039;&#039;&#039;&amp;amp;&#039;&#039;&#039;&lt;br /&gt;
#Replace &#039;&#039;&#039;to&#039;&#039;&#039; with &#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
#Replace &#039;&#039;&#039;for&#039;&#039;&#039; with &#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Handling passwords ===&lt;br /&gt;
#Never send the actual password - always send the pass phrase&lt;br /&gt;
#Make sure that the password created out of the pass phrase is at least 10 characters long since using initials results in a lot of i&#039;s and a&#039;s etc which reduces the effectiveness of the password and allows hacking via brute force guessing especially since windows doesnt slow down logins even if it sees thousands of password attempts&lt;br /&gt;
#Pass phrases are never to be sent by email, whatever the case maybe.&lt;br /&gt;
#Pass phrases can be sent by chat - however they have to be broken down in two parts and sent separately over two different messengers or if you are using Gtalk then use the &#039;off the record&#039; mode.&lt;br /&gt;
#Using SMS to send pass phrases is the best known way as of now.&lt;br /&gt;
#If you save the passwords on your system in an file then:&lt;br /&gt;
#*Ensure that you only store pass phrases in the excel file&lt;br /&gt;
#*Ensure that the excel file is encrypted with a master password&lt;br /&gt;
&lt;br /&gt;
== NEOSYS Maintenance Window ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS server is functional from 6am – 1am. There is a 5hr window gap for the system to perform updates &amp;amp; backups.&lt;br /&gt;
&lt;br /&gt;
The 5hr maintenance window:-&lt;br /&gt;
&lt;br /&gt;
1. At 1am – The server performs a data backup on a USB (for the respective clients) &amp;amp; once the backup has been completed, the system automatically generates an email addressed to the neosys staff &amp;amp; the respective clients.&lt;br /&gt;
&lt;br /&gt;
2. At 2:45am – The main data over writes the test data on the server.&lt;br /&gt;
&lt;br /&gt;
3. At 3:00am – The server by itself performs an update for Windows.&lt;br /&gt;
&lt;br /&gt;
4. At 4:00am – The server performs a backup to the headquarters for clients, and then automatically generates an email addressed to the NEOSYS staff &amp;amp; the respective clients.&lt;br /&gt;
&lt;br /&gt;
5. At 6:00am – The server starts up NEOSYS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Amending/Reposting Journal Entries ==&lt;br /&gt;
In certain exceptional cases, amending/reposting of journal entries is allowed for a brief period of time to enable clients to present reports in an alternative manner. This would be subject to NEOSYS would requiring a written LETTER OF APPROVAL duly signed and stamped by the highest management of the company.&lt;br /&gt;
&lt;br /&gt;
In case the client management decides to allow editing/reposting of journal entries, the following procedure is to be followed:&lt;br /&gt;
# Client must de-allocate vouchers which need to be amended&lt;br /&gt;
# NEOSYS support staff must wait for a day so that de-allocated vouchers are copied into Test database&lt;br /&gt;
# Authorise required users to amend and repost (without record) &#039;&#039;&#039;in Test database only&#039;&#039;&#039; &amp;lt;br&amp;gt;( While reposting, we have 2 options i.e. with record and without record. The &#039;with record&#039; option causes the system to maintain a history of edits made. Hence, we want to repost without record so that there is no trace of the edit in the system)&lt;br /&gt;
# Amend a substantial number of vouchers in Test and verify them.&amp;lt;br&amp;gt;To verify if the edits made are reflected:&lt;br /&gt;
# *Print all ledgers for the whole year&lt;br /&gt;
# *Cross-check all balances&lt;br /&gt;
# Once you verify the balances are correct in Test database, grant users permission to amend and repost in the Live database.&lt;br /&gt;
# Ask users to amend and repost vouchers in the Live database.&lt;br /&gt;
# Cross-check all balances for the current year.&lt;br /&gt;
# If you successfully verify the balances, revoke permissions immediately. Else, wait for 24 hours and revoke permissions irrespectively.&lt;br /&gt;
&lt;br /&gt;
== Removal of unauthorized third-party software on client servers ==&lt;br /&gt;
&lt;br /&gt;
Rule: Any third party software that is discovered by NEOSYS support staff on client servers that has been installed without the agreement of NEOSYS should be uninstalled immediately on discovery.&lt;br /&gt;
&lt;br /&gt;
However purposeful a software is, NEOSYS is contractually responsible for support and there are too many opportunities for poorly installed software to cause unpredictable damage to the NEOSYS database so NEOSYS has to have a clear and safe and simple policy to ensure the integrity of client data. Installing software without prior discussion with NEOSYS by itself indicates that insufficient care and consideration as been given to possible issues.&lt;br /&gt;
&lt;br /&gt;
Any software required by client IT for some purpose may only be installed after discussion and agreement from NEOSYS support staff concerning the configuration and operation of the software.&lt;br /&gt;
&lt;br /&gt;
The NEOSYS Software Licence and Support agreement requires that where NEOSYS software is installed on client servers that a dedicated server is provided and dedicated implies that no other software may be installed without the agreement of NEOSYS support.&lt;br /&gt;
&lt;br /&gt;
== Configuring tunnelier to autologin on opening tlp files ==&lt;br /&gt;
If you have many tunnelier tlp files in a directory and connect by opening the desired tlp file the, instead of opening the file and then clicking Login you can also right click the file and select Connect.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can configure tunnelier to login (connect) automatically by following the procedure mentioned below. (Even if you configure automatic login, you can still open and not login by right clicking and choosing Open)&lt;br /&gt;
&lt;br /&gt;
=== Windows 8 ===&lt;br /&gt;
&lt;br /&gt;
Cannot be done using standard Windows UI. Some download utilities can do it. TODO put a safe one in neosys.com/support&lt;br /&gt;
&lt;br /&gt;
=== Windows XP/Vista/7/2008 ===&lt;br /&gt;
&lt;br /&gt;
#Go to My Computer&lt;br /&gt;
#Click on Tools -&amp;gt; Folder Options &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tunnauto-1.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click on File Types&lt;br /&gt;
#*Select TLP (Bitvise Tunnelier Profile) [Type &amp;quot;TLP&amp;quot; to find it quickly]&lt;br /&gt;
#*Click on Advanced &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tunnauto-2.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Connect and Click on Set Default &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[image:tunnauto-3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[ New Employee Training Checklist]]==&lt;br /&gt;
&lt;br /&gt;
==[[ New Client Training Notes]]==&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=New_Client_Training_Notes&amp;diff=1872</id>
		<title>New Client Training Notes</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=New_Client_Training_Notes&amp;diff=1872"/>
		<updated>2014-12-03T13:05:30Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Undo revision 1871 by Nikhil (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prior to Training – Preparation for the Meeting==&lt;br /&gt;
#List the modules for your own reference that you are going to train the users in (Media, Jobs, Timesheets and/or Finance) and prepare accordingly&lt;br /&gt;
#Get an idea of your audience with details like the number of users, their designations and what kind of access they have to NEOSYS&lt;br /&gt;
#Prepare handouts listing the topics to be covered in the training session. The user can use this handout to keep track of what happens in training and take notes for reference later&lt;br /&gt;
#Create a time-table for trainings and inform the client the same&lt;br /&gt;
#Contact Client IT to ensure technical details like firewall exclusions and proxies (if applicable) are configured correctly so that users have access to NEOSYS without issues&lt;br /&gt;
#Email training session pre-requisites to the client contact e.g. internet connectivity and projector in the meeting room&lt;br /&gt;
#Create an account in the Authorisation file namely Admin, with complete access to NEOSYS. This account can be used for emergency changes in the configuration of the system while at the client location&lt;br /&gt;
&lt;br /&gt;
==During Training==&lt;br /&gt;
NEOSYS Staff are responsible to cover the whole of training superficially and not do in depth training. Show users what they need to get started and don’t allow them to slow down training by replying to in depth queries.&lt;br /&gt;
&lt;br /&gt;
Onsite sessions at the client are not just &amp;quot;training&amp;quot; sessions. They are &amp;lt;b&amp;gt;implementation&amp;lt;/b&amp;gt; sessions and need to set clear objectives for clients to start implementing the system. It is easy to squander time and resources if client staff believe they can sit back and &amp;quot;be trained&amp;quot; instead of &amp;quot;learn and implement&amp;quot;. The end result of such squandering is likely that NEOSYS is asked to return again and again simply due to bad organisation. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;How to train:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Training should be done in HALF DAYS and never in whole days because it doesn’t allow client staff time to IMPLEMENT THE SYSTEM. In between sessions client staff has to do work to get things. &lt;br /&gt;
&lt;br /&gt;
Initial training on site is half a day per module and NO MORE because client needs to mentally get into action themselves and not sit back thinking all they have to do is listen. &lt;br /&gt;
&lt;br /&gt;
There are two very different jobs that have to be done during training:&lt;br /&gt;
&lt;br /&gt;
a) Embedding into knowledge of how NEOSYS works into peoples brains&lt;br /&gt;
&lt;br /&gt;
b) Users working out how to use NEOSYS to perform their work since NEOSYS might not handle everything exactly as they imagine&lt;br /&gt;
&lt;br /&gt;
Trainees will often slow down (a) by trying to solve every petty problem in (b). NEOSYS trainers must find a healthy balance to ensure that (a) is done before going in depth in (b). The trainer, like a good chairman of a meeting, should control who can speak and for how long. Failing to do this allows few people to talk too long and everybody complaining that the training was not productive.&lt;br /&gt;
&lt;br /&gt;
Every client staff member must be given some tasks to complete in NEOSYS by themselves before they get into the next training session. The task should include getting printouts of their work. Each person’s work should be inspected and discussed at the next session. &lt;br /&gt;
&lt;br /&gt;
Only ONE NEOSYS staff should conduct implementation sessions unless it is to introduce a junior NEOSYS member to on-site work. Training in parallel by multiple NEOSYS staff is a waste of resources because of the lack of coordinated implementation.&lt;br /&gt;
&lt;br /&gt;
Client finance staff needs to participate in all sessions and not be given private training sessions for what has already been done for operations staff. &lt;br /&gt;
&lt;br /&gt;
Care and attention will produce a quality implementation. Easy and relaxed approach will not produce good results. TAKE ACTION! MAKE A DIFFERENCE!&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
Spend 15min in introducing the users to NEOSYS and explaining basic essential points of accessing NEOSYS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	URL&lt;br /&gt;
*	Certificate&lt;br /&gt;
*       Turning off Pop-up Blocker&lt;br /&gt;
*	Login Page&lt;br /&gt;
*	Dataset&lt;br /&gt;
*	Reset Password&lt;br /&gt;
&lt;br /&gt;
===Media module===&lt;br /&gt;
&lt;br /&gt;
Spend 20-30 min showing a complete schedule creation with 1 client and 1 brand, vehicle and supplier. Show schedule booking, certification and invoicing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	NEOSYS schedule per brand&lt;br /&gt;
*	New schedule&lt;br /&gt;
*	NEOSYS Codes&lt;br /&gt;
*	Client and Brand file&lt;br /&gt;
*	Supplier and Vehicle file&lt;br /&gt;
*	Media Types&lt;br /&gt;
*	Specification, Time, dates&lt;br /&gt;
*	Gross unit, Other charges and exchange rate file&lt;br /&gt;
*	Booking in a schedule&lt;br /&gt;
*	Certifying ads in a schedule&lt;br /&gt;
*	Invoicing ads in a schedule&lt;br /&gt;
*	Media Diary&lt;br /&gt;
*	Reports under Media menu&lt;br /&gt;
*       Media Analysis&lt;br /&gt;
&lt;br /&gt;
===Job Module===&lt;br /&gt;
Do 20-30min showing 1 Job, client and brand creation, estimate, purchase order, invoicing and purchase invoicing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Creation of Job&lt;br /&gt;
*	Client and Brand file&lt;br /&gt;
*	Supplier and Vehicle file&lt;br /&gt;
*	Job types&lt;br /&gt;
*	Estimate&lt;br /&gt;
*	Purchase order&lt;br /&gt;
*	Invoice&lt;br /&gt;
*	Purchase Invoice&lt;br /&gt;
&lt;br /&gt;
===Finance Module===&lt;br /&gt;
Do 20-30min showing how to enter opening balances, link client and supplier to finance, Chart of Accounts, posting invoices on the journal entry screen, unposted batches, allocations, analysis codes and financial reports.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Chart of Accounts&lt;br /&gt;
*	BL, PL, TD and TC charts&lt;br /&gt;
*	Company File&lt;br /&gt;
*	Link between Finance and Operations – Media and Job type files&lt;br /&gt;
* 	Automatic entries in Finance&lt;br /&gt;
*       Automatic Accrual Accounts&lt;br /&gt;
*	Analysis codes&lt;br /&gt;
*	Journal entry screen – unposted batches, posting batches and doing a manual entry&lt;br /&gt;
*	Voucher file&lt;br /&gt;
*  	Voucher allocations in Journal entry and Allocations screen, partial allocation and de-allocation&lt;br /&gt;
*	Journal setup&lt;br /&gt;
*       Finance Settings &lt;br /&gt;
*	Ledger and Statement of Account&lt;br /&gt;
*	Financial Reports&lt;br /&gt;
*       Billing Analysis Reports&lt;br /&gt;
&lt;br /&gt;
===Timesheet Module===&lt;br /&gt;
Do 10-15 min showing users separate access (neosys2) to timesheets, how to select a job and enter details in the timesheet, how to avoid reminders for holidays and timer usage. &lt;br /&gt;
Show Timesheet administrators how to take Timesheet printouts, how to setup hourly rates, avoid email reminders for all users and change settings in timesheet configuration file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For Users&amp;lt;/b&amp;gt;&lt;br /&gt;
*	URL – neosys2&lt;br /&gt;
*	Selecting Jobs in timesheet&lt;br /&gt;
*	Entering details and saving&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For Admins&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Timesheet approval&lt;br /&gt;
*	Timesheet printout and approval emails&lt;br /&gt;
*	Timesheet files (Activity, hourly rates and configuration file)&lt;br /&gt;
*	Timesheet Analysis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Topics===&lt;br /&gt;
In addition to the modules, the following points have to be explained to the users. &lt;br /&gt;
* File lock and release in 10min&lt;br /&gt;
* Reopen and Release&lt;br /&gt;
* File in use/File open for viewing only&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=New_Client_Training_Notes&amp;diff=1871</id>
		<title>New Client Training Notes</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=New_Client_Training_Notes&amp;diff=1871"/>
		<updated>2014-12-03T13:02:48Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Reverted edits by Nikhil (talk) to last revision by Priyanka&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prior to Training – Preparation for the Meeting==&lt;br /&gt;
#List the modules for your own reference that you are going to train the users in (Media, Jobs, Timesheets and/or Finance) and prepare accordingly&lt;br /&gt;
#Get an idea of your audience with details like the number of users, their designations and what kind of access they have to NEOSYS&lt;br /&gt;
#Prepare handouts listing the topics to be covered in the training session. The user can use this handout to keep track of what happens in training and take notes for reference later. &lt;br /&gt;
#Create a time-table for trainings and inform the client the same&lt;br /&gt;
#Contact Client IT and ensure that users have access to NEOSYS without issues&lt;br /&gt;
#Email training per-requisites (internet, projector etc.) to the client contact &lt;br /&gt;
#Create an admin account with complete access in case of emergency changes to the system while at the client place&lt;br /&gt;
&lt;br /&gt;
==During Training==&lt;br /&gt;
NEOSYS Staff are responsible to cover the whole of training superficially and not do in depth training. Show users what they need to get started and don’t allow them to slow down training by replying to in depth queries.&lt;br /&gt;
&lt;br /&gt;
Onsite sessions at the client are not just &amp;quot;training&amp;quot; sessions. They are &amp;lt;b&amp;gt;implementation&amp;lt;/b&amp;gt; sessions and need to set clear objectives for clients to start implementing the system. It is easy to squander time and resources if client staff believe they can sit back and &amp;quot;be trained&amp;quot; instead of &amp;quot;learn and implement&amp;quot;. The end result of such squandering is likely that NEOSYS is asked to return again and again simply due to bad organisation. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;How to train:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Training should be done in HALF DAYS and never in whole days because it doesn’t allow client staff time to IMPLEMENT THE SYSTEM. In between sessions client staff has to do work to get things. &lt;br /&gt;
&lt;br /&gt;
Initial training on site is half a day per module and NO MORE because client needs to mentally get into action themselves and not sit back thinking all they have to do is listen. &lt;br /&gt;
&lt;br /&gt;
There are two very different jobs that have to be done during training:&lt;br /&gt;
&lt;br /&gt;
a) Embedding into knowledge of how NEOSYS works into peoples brains&lt;br /&gt;
&lt;br /&gt;
b) Users working out how to use NEOSYS to perform their work since NEOSYS might not handle everything exactly as they imagine&lt;br /&gt;
&lt;br /&gt;
Trainees will often slow down (a) by trying to solve every petty problem in (b). NEOSYS trainers must find a healthy balance to ensure that (a) is done before going in depth in (b). The trainer, like a good chairman of a meeting, should control who can speak and for how long. Failing to do this allows few people to talk too long and everybody complaining that the training was not productive.&lt;br /&gt;
&lt;br /&gt;
Every client staff member must be given some tasks to complete in NEOSYS by themselves before they get into the next training session. The task should include getting printouts of their work. Each person’s work should be inspected and discussed at the next session. &lt;br /&gt;
&lt;br /&gt;
Only ONE NEOSYS staff should conduct implementation sessions unless it is to introduce a junior NEOSYS member to on-site work. Training in parallel by multiple NEOSYS staff is a waste of resources because of the lack of coordinated implementation.&lt;br /&gt;
&lt;br /&gt;
Client finance staff needs to participate in all sessions and not be given private training sessions for what has already been done for operations staff. &lt;br /&gt;
&lt;br /&gt;
Care and attention will produce a quality implementation. Easy and relaxed approach will not produce good results. TAKE ACTION! MAKE A DIFFERENCE!&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
Spend 15min in introducing the users to NEOSYS and explaining basic essential points of accessing NEOSYS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	URL&lt;br /&gt;
*	Certificate&lt;br /&gt;
*       Turning off Pop-up Blocker&lt;br /&gt;
*	Login Page&lt;br /&gt;
*	Dataset&lt;br /&gt;
*	Reset Password&lt;br /&gt;
&lt;br /&gt;
===Media module===&lt;br /&gt;
&lt;br /&gt;
Spend 20-30 min showing a complete schedule creation with 1 client and 1 brand, vehicle and supplier. Show schedule booking, certification and invoicing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	NEOSYS schedule per brand&lt;br /&gt;
*	New schedule&lt;br /&gt;
*	NEOSYS Codes&lt;br /&gt;
*	Client and Brand file&lt;br /&gt;
*	Supplier and Vehicle file&lt;br /&gt;
*	Media Types&lt;br /&gt;
*	Specification, Time, dates&lt;br /&gt;
*	Gross unit, Other charges and exchange rate file&lt;br /&gt;
*	Booking in a schedule&lt;br /&gt;
*	Certifying ads in a schedule&lt;br /&gt;
*	Invoicing ads in a schedule&lt;br /&gt;
*	Media Diary&lt;br /&gt;
*	Reports under Media menu&lt;br /&gt;
*       Media Analysis&lt;br /&gt;
&lt;br /&gt;
===Job Module===&lt;br /&gt;
Do 20-30min showing 1 Job, client and brand creation, estimate, purchase order, invoicing and purchase invoicing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Creation of Job&lt;br /&gt;
*	Client and Brand file&lt;br /&gt;
*	Supplier and Vehicle file&lt;br /&gt;
*	Job types&lt;br /&gt;
*	Estimate&lt;br /&gt;
*	Purchase order&lt;br /&gt;
*	Invoice&lt;br /&gt;
*	Purchase Invoice&lt;br /&gt;
&lt;br /&gt;
===Finance Module===&lt;br /&gt;
Do 20-30min showing how to enter opening balances, link client and supplier to finance, Chart of Accounts, posting invoices on the journal entry screen, unposted batches, allocations, analysis codes and financial reports.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Chart of Accounts&lt;br /&gt;
*	BL, PL, TD and TC charts&lt;br /&gt;
*	Company File&lt;br /&gt;
*	Link between Finance and Operations – Media and Job type files&lt;br /&gt;
* 	Automatic entries in Finance&lt;br /&gt;
*       Automatic Accrual Accounts&lt;br /&gt;
*	Analysis codes&lt;br /&gt;
*	Journal entry screen – unposted batches, posting batches and doing a manual entry&lt;br /&gt;
*	Voucher file&lt;br /&gt;
*  	Voucher allocations in Journal entry and Allocations screen, partial allocation and de-allocation&lt;br /&gt;
*	Journal setup&lt;br /&gt;
*       Finance Settings &lt;br /&gt;
*	Ledger and Statement of Account&lt;br /&gt;
*	Financial Reports&lt;br /&gt;
*       Billing Analysis Reports&lt;br /&gt;
&lt;br /&gt;
===Timesheet Module===&lt;br /&gt;
Do 10-15 min showing users separate access (neosys2) to timesheets, how to select a job and enter details in the timesheet, how to avoid reminders for holidays and timer usage. &lt;br /&gt;
Show Timesheet administrators how to take Timesheet printouts, how to setup hourly rates, avoid email reminders for all users and change settings in timesheet configuration file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For Users&amp;lt;/b&amp;gt;&lt;br /&gt;
*	URL – neosys2&lt;br /&gt;
*	Selecting Jobs in timesheet&lt;br /&gt;
*	Entering details and saving&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For Admins&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Timesheet approval&lt;br /&gt;
*	Timesheet printout and approval emails&lt;br /&gt;
*	Timesheet files (Activity, hourly rates and configuration file)&lt;br /&gt;
*	Timesheet Analysis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Topics===&lt;br /&gt;
In addition to the modules, the following points have to be explained to the users&lt;br /&gt;
* File lock and release in 10min&lt;br /&gt;
* Reopen and Release&lt;br /&gt;
* File in use/File open for viewing only&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=New_Client_Training_Notes&amp;diff=1870</id>
		<title>New Client Training Notes</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=New_Client_Training_Notes&amp;diff=1870"/>
		<updated>2014-12-03T13:02:04Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Additional Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prior to Training – Preparation for the Meeting==&lt;br /&gt;
#List the modules for your own reference that you are going to train the users in (Media, Jobs, Timesheets and/or Finance) and prepare accordingly&lt;br /&gt;
#Get an idea of your audience with details like the number of users, their designations and what kind of access they have to NEOSYS&lt;br /&gt;
#Prepare handouts listing the topics to be covered in the training session. The user can use this handout to keep track of what happens in training and take notes for reference later&lt;br /&gt;
#Create a time-table for trainings and inform the client the same&lt;br /&gt;
#Contact Client IT to ensure technical details like firewall exclusions and proxies (if applicable) are configured correctly so that users have access to NEOSYS without issues&lt;br /&gt;
#Email training session pre-requisites to the client contact e.g. internet connectivity and projector in the meeting room&lt;br /&gt;
#Create an account in the Authorisation file namely Admin, with complete access to NEOSYS. This account can be used for emergency changes in the configuration of the system while at the client location&lt;br /&gt;
&lt;br /&gt;
==During Training==&lt;br /&gt;
NEOSYS Staff are responsible to cover the whole of training superficially and not do in depth training. Show users what they need to get started and don’t allow them to slow down training by replying to in depth queries.&lt;br /&gt;
&lt;br /&gt;
Onsite sessions at the client are not just &amp;quot;training&amp;quot; sessions. They are &amp;lt;b&amp;gt;implementation&amp;lt;/b&amp;gt; sessions and need to set clear objectives for clients to start implementing the system. It is easy to squander time and resources if client staff believe they can sit back and &amp;quot;be trained&amp;quot; instead of &amp;quot;learn and implement&amp;quot;. The end result of such squandering is likely that NEOSYS is asked to return again and again simply due to bad organisation. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;How to train:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Training should be done in HALF DAYS and never in whole days because it doesn’t allow client staff time to IMPLEMENT THE SYSTEM. In between sessions client staff has to do work to get things. &lt;br /&gt;
&lt;br /&gt;
Initial training on site is half a day per module and NO MORE because client needs to mentally get into action themselves and not sit back thinking all they have to do is listen. &lt;br /&gt;
&lt;br /&gt;
There are two very different jobs that have to be done during training:&lt;br /&gt;
&lt;br /&gt;
a) Embedding into knowledge of how NEOSYS works into peoples brains&lt;br /&gt;
&lt;br /&gt;
b) Users working out how to use NEOSYS to perform their work since NEOSYS might not handle everything exactly as they imagine&lt;br /&gt;
&lt;br /&gt;
Trainees will often slow down (a) by trying to solve every petty problem in (b). NEOSYS trainers must find a healthy balance to ensure that (a) is done before going in depth in (b). The trainer, like a good chairman of a meeting, should control who can speak and for how long. Failing to do this allows few people to talk too long and everybody complaining that the training was not productive.&lt;br /&gt;
&lt;br /&gt;
Every client staff member must be given some tasks to complete in NEOSYS by themselves before they get into the next training session. The task should include getting printouts of their work. Each person’s work should be inspected and discussed at the next session. &lt;br /&gt;
&lt;br /&gt;
Only ONE NEOSYS staff should conduct implementation sessions unless it is to introduce a junior NEOSYS member to on-site work. Training in parallel by multiple NEOSYS staff is a waste of resources because of the lack of coordinated implementation.&lt;br /&gt;
&lt;br /&gt;
Client finance staff needs to participate in all sessions and not be given private training sessions for what has already been done for operations staff. &lt;br /&gt;
&lt;br /&gt;
Care and attention will produce a quality implementation. Easy and relaxed approach will not produce good results. TAKE ACTION! MAKE A DIFFERENCE!&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
Spend 15min in introducing the users to NEOSYS and explaining basic essential points of accessing NEOSYS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	URL&lt;br /&gt;
*	Certificate&lt;br /&gt;
*       Turning off Pop-up Blocker&lt;br /&gt;
*	Login Page&lt;br /&gt;
*	Dataset&lt;br /&gt;
*	Reset Password&lt;br /&gt;
&lt;br /&gt;
===Media module===&lt;br /&gt;
&lt;br /&gt;
Spend 20-30 min showing a complete schedule creation with 1 client and 1 brand, vehicle and supplier. Show schedule booking, certification and invoicing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	NEOSYS schedule per brand&lt;br /&gt;
*	New schedule&lt;br /&gt;
*	NEOSYS Codes&lt;br /&gt;
*	Client and Brand file&lt;br /&gt;
*	Supplier and Vehicle file&lt;br /&gt;
*	Media Types&lt;br /&gt;
*	Specification, Time, dates&lt;br /&gt;
*	Gross unit, Other charges and exchange rate file&lt;br /&gt;
*	Booking in a schedule&lt;br /&gt;
*	Certifying ads in a schedule&lt;br /&gt;
*	Invoicing ads in a schedule&lt;br /&gt;
*	Media Diary&lt;br /&gt;
*	Reports under Media menu&lt;br /&gt;
*       Media Analysis&lt;br /&gt;
&lt;br /&gt;
===Job Module===&lt;br /&gt;
Do 20-30min showing 1 Job, client and brand creation, estimate, purchase order, invoicing and purchase invoicing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Creation of Job&lt;br /&gt;
*	Client and Brand file&lt;br /&gt;
*	Supplier and Vehicle file&lt;br /&gt;
*	Job types&lt;br /&gt;
*	Estimate&lt;br /&gt;
*	Purchase order&lt;br /&gt;
*	Invoice&lt;br /&gt;
*	Purchase Invoice&lt;br /&gt;
&lt;br /&gt;
===Finance Module===&lt;br /&gt;
Do 20-30min showing how to enter opening balances, link client and supplier to finance, Chart of Accounts, posting invoices on the journal entry screen, unposted batches, allocations, analysis codes and financial reports.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Chart of Accounts&lt;br /&gt;
*	BL, PL, TD and TC charts&lt;br /&gt;
*	Company File&lt;br /&gt;
*	Link between Finance and Operations – Media and Job type files&lt;br /&gt;
* 	Automatic entries in Finance&lt;br /&gt;
*       Automatic Accrual Accounts&lt;br /&gt;
*	Analysis codes&lt;br /&gt;
*	Journal entry screen – unposted batches, posting batches and doing a manual entry&lt;br /&gt;
*	Voucher file&lt;br /&gt;
*  	Voucher allocations in Journal entry and Allocations screen, partial allocation and de-allocation&lt;br /&gt;
*	Journal setup&lt;br /&gt;
*       Finance Settings &lt;br /&gt;
*	Ledger and Statement of Account&lt;br /&gt;
*	Financial Reports&lt;br /&gt;
*       Billing Analysis Reports&lt;br /&gt;
&lt;br /&gt;
===Timesheet Module===&lt;br /&gt;
Do 10-15 min showing users separate access (neosys2) to timesheets, how to select a job and enter details in the timesheet, how to avoid reminders for holidays and timer usage. &lt;br /&gt;
Show Timesheet administrators how to take Timesheet printouts, how to setup hourly rates, avoid email reminders for all users and change settings in timesheet configuration file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Topics to cover&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For Users&amp;lt;/b&amp;gt;&lt;br /&gt;
*	URL – neosys2&lt;br /&gt;
*	Selecting Jobs in timesheet&lt;br /&gt;
*	Entering details and saving&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For Admins&amp;lt;/b&amp;gt;&lt;br /&gt;
*	Timesheet approval&lt;br /&gt;
*	Timesheet printout and approval emails&lt;br /&gt;
*	Timesheet files (Activity, hourly rates and configuration file)&lt;br /&gt;
*	Timesheet Analysis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Topics===&lt;br /&gt;
In addition to the modules, the following points have to be explained to the users. See [http://techwiki.neosys.com/index.php/Administering_NEOSYS_Server#Clearing_File_Locks File lock and release]&lt;br /&gt;
* File lock and release in 10min&lt;br /&gt;
* Reopen and Release&lt;br /&gt;
* File in use/File open for viewing only&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1827</id>
		<title>Implementing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1827"/>
		<updated>2014-11-30T08:16:59Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Set up the System Configuration File==&lt;br /&gt;
See [http://userwiki.neosys.com/index.php/System_Configuration_File System Configuration File] for detailed description. The following points are essential configuration and must not be ignored.&lt;br /&gt;
&lt;br /&gt;
*All configurations must be carefully done after evaluating which [http://userwiki.neosys.com/index.php/System_Configuration_File#Scope Scope] they fall under.&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#System_ID System ID] and User Timezone&lt;br /&gt;
*Set up [http://userwiki.neosys.com/index.php/System_Configuration_File#General Email Domains] and [http://userwiki.neosys.com/index.php/System_Configuration_File#General IP Numbers]&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#Web_Address_and_Description URL/Web Address] to access NEOSYS. This is very important for a Timesheet module installation as the approver links are picked up from the configuration. &lt;br /&gt;
&lt;br /&gt;
==Setting up a new company in the new database==&lt;br /&gt;
Refer to the [http://userwiki.neosys.com/index.php/Setting_up_multi_company_installations_/_Setting_up_a_new_company#Draft_email_requesting_info_required_to_add_new_company_to_existing_database sample email for New Company creation in existing Database/New Database] &lt;br /&gt;
&lt;br /&gt;
Once the new company is added to the database:&lt;br /&gt;
#Delete Startup Company from the list of companies in the database. To delete Startup company see [[Configuring_NEOSYS_Finance_System#How_to_delete_a_company_from_the_dataset.3F|How to delete a company]]&#039;&#039;&#039;&lt;br /&gt;
#Delete “Client X” from the Client and Brand File&lt;br /&gt;
&lt;br /&gt;
Change the system mark for each of the new databases that were created. See [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Configuring_Client_Security_mark Configuring System Mark]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1826</id>
		<title>Implementing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1826"/>
		<updated>2014-11-30T07:45:22Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Set up the System Configuration File==&lt;br /&gt;
See [http://userwiki.neosys.com/index.php/System_Configuration_File System Configuration File] for detailed description. The following points are essential configuration and must not be ignored.&lt;br /&gt;
&lt;br /&gt;
*All configurations must carefully done after evaluating which [http://userwiki.neosys.com/index.php/System_Configuration_File#Scope Scope] they fall under.&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#System_ID System ID] and User Timezone&lt;br /&gt;
*Set up [http://userwiki.neosys.com/index.php/System_Configuration_File#General Email Domains] and [http://userwiki.neosys.com/index.php/System_Configuration_File#General IP Numbers]&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#Web_Address_and_Description URL/Web Address] to access NEOSYS. This is very important for a Timesheet module installation as the approver links are picked up from the configuration. &lt;br /&gt;
&lt;br /&gt;
==Setting up a new company in the new database==&lt;br /&gt;
Refer to the [http://userwiki.neosys.com/index.php/Setting_up_multi_company_installations_/_Setting_up_a_new_company#Draft_email_requesting_info_required_to_add_new_company_to_existing_database sample email for New Company creation in existing Database/New Database] &lt;br /&gt;
&lt;br /&gt;
Once the new company is added to the database:&lt;br /&gt;
#Delete Startup Company from the list of companies in the database. To delete Startup company see [[Configuring_NEOSYS_Finance_System#How_to_delete_a_company_from_the_dataset.3F|How to delete a company]]&#039;&#039;&#039;&lt;br /&gt;
#Delete “Client X” from the Client and Brand File&lt;br /&gt;
&lt;br /&gt;
Change the system mark for each of the new databases that were created. See [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Configuring_Client_Security_mark Configuring System Mark]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1825</id>
		<title>Implementing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1825"/>
		<updated>2014-11-30T07:41:50Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Set up the System Configuration File==&lt;br /&gt;
See [http://userwiki.neosys.com/index.php/System_Configuration_File System Configuration File] for detailed description. The following points are essential configuration and must not be ignored.&lt;br /&gt;
&lt;br /&gt;
*All configurations must carefully done after evaluating which [http://userwiki.neosys.com/index.php/System_Configuration_File#Scope Scope] they fall under.&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#System_ID System ID] and User Timezone&lt;br /&gt;
*Set up [http://userwiki.neosys.com/index.php/System_Configuration_File#General Email Domains] and [http://userwiki.neosys.com/index.php/System_Configuration_File#General IP Numbers]&lt;br /&gt;
*Configure [http://userwiki.neosys.com/index.php/System_Configuration_File#Web_Address_and_Description URL/Web Address] to access NEOSYS. This is very important for a Timesheet module installation as the approver links are picked up from the configuration. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting up a new company in the new database==&lt;br /&gt;
Refer to the [http://userwiki.neosys.com/index.php/Setting_up_multi_company_installations_/_Setting_up_a_new_company#Draft_email_requesting_info_required_to_add_new_company_to_existing_database sample email for New Company creation in existing Database/New Database] &lt;br /&gt;
&lt;br /&gt;
Once the new company is added to the database:&lt;br /&gt;
#Delete Startup Company from the list of companies in the database. To delete Startup company see [[Configuring_NEOSYS_Finance_System#How_to_delete_a_company_from_the_dataset.3F|How to delete a company]]&#039;&#039;&#039;&lt;br /&gt;
#Delete “Client X” from the Client and Brand File&lt;br /&gt;
&lt;br /&gt;
Change the system mark for each of the new databases that were created. See [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Configuring_Client_Security_mark Configuring System Mark]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1824</id>
		<title>Configuring NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1824"/>
		<updated>2014-11-30T06:40:05Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Configuration File ==&lt;br /&gt;
&lt;br /&gt;
See [http://userwiki.neosys.com/index.php/System_Configuration_File System Configuration File]&lt;br /&gt;
&lt;br /&gt;
== Clearing files in database ==&lt;br /&gt;
&lt;br /&gt;
This is to be done if you want to clean an old database or clean a training database so that a client can enter fresh data.&lt;br /&gt;
&lt;br /&gt;
These commands DO NOT reset the data to &amp;quot;factory settings&amp;quot; so for new installations you need to download a fresh BACKUP.ZIP file from the NEOSYS website.&lt;br /&gt;
&lt;br /&gt;
*Clear transactions F5 - CLEAROP (only clears transactions not reference files)&lt;br /&gt;
&lt;br /&gt;
*Clear all F5 - CLEARALL (rather nasty command because it clears all reference files as well)&lt;br /&gt;
&lt;br /&gt;
*Clear finance transactions F5 - CLEARACC&lt;br /&gt;
&lt;br /&gt;
== Clearing selected files in database ==&lt;br /&gt;
&lt;br /&gt;
This can be done if you want to reimport selected files. The flush index command MUST be performed after doing any clearing.&lt;br /&gt;
&lt;br /&gt;
WARNING This procedure must not be used if there are any transaction in the system that might use the files being cleared.&lt;br /&gt;
&lt;br /&gt;
WARNING Clearing individual files is error prone because other files might refer to the records you are clearing (referential integrity is not applied so dangling references may be created). For example, clearing suppliers without clearing vehicles in advance results in vehicles which have supplier codes that do not exist. Even if you reimport the suppliers, some supplier codes in the vehicles file may not be reimported leaving vehicles with problems.&lt;br /&gt;
&lt;br /&gt;
WARNING The opportunity to create problems that have no solution and that may only surface when the system is in operation is endless unless you think through the implications very very very carefully.&lt;br /&gt;
&lt;br /&gt;
*Flush Index		F5	FLUSH.INDEX (this command MUST be performed immediately after any data clearing)&lt;br /&gt;
&lt;br /&gt;
*Clear suppliers		F5	CLEARFILE SUPPLIERS&lt;br /&gt;
&lt;br /&gt;
*Clear vehicles		F5	CLEARFILE VEHICLES&lt;br /&gt;
&lt;br /&gt;
*Clear Payment Instruction F5    CLEARFIELD CLIENTS PAYMENT_INSTRUCTIONS (only clears the payment instruction from the client and brand file)&lt;br /&gt;
&lt;br /&gt;
== Mass updating database without data entry ==&lt;br /&gt;
&lt;br /&gt;
Warning: It is advisable that you take the approval of NEOSYS DBA or programmers before doing any of the following procedures. There is no protection whatsoever from damaging the database if you do not appreciate all the implications of any particular update. Common sense and caution must be used. If you damage a database then it may be, or with operation become, irretrievably damaged and require reconstruction from a backup causing possibly extreme finance damages to the owner of the data and consequences for yourself. You have been warned.&lt;br /&gt;
&lt;br /&gt;
There are many commands in maintenance mode that allow you to amend the database directly and without any record and without any ability to reverse changes.&lt;br /&gt;
&lt;br /&gt;
Normally, no record of the changes is made. All changes will appear to have been done by the last user at the time and date of the last normal user interface amendments.&lt;br /&gt;
&lt;br /&gt;
=== Available fields to clear or set ===&lt;br /&gt;
&lt;br /&gt;
#Client &amp;amp; Brand File: CLIENTS MARKET_CODE&lt;br /&gt;
#Client &amp;amp; Brand File: BRANDS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to clear a database field ===&lt;br /&gt;
&lt;br /&gt;
Assuming that a particular database field may be blank (i.e. not required for data entry) then you may clear a field as follows.&lt;br /&gt;
&lt;br /&gt;
Warning: There is nothing to stop you clearing a field that is mandatory and doing this may cause irrecoverable damage to the database.&lt;br /&gt;
&lt;br /&gt;
In the following example we wish to change all clients with market code “UAE to have market code blank.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to clear all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “UAE”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
&lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to set a database field ===&lt;br /&gt;
&lt;br /&gt;
In the following example we change all the clients where the market code is blank (has not been entered) to become “UAE”.&lt;br /&gt;
&lt;br /&gt;
Warning: You can set the market code to a market code that does not exist. This will cause various problems in the operation of the system but is probably not irrecoverable.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to set all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
 &lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE/UAE&lt;br /&gt;
&lt;br /&gt;
== Backup to other media (i.e. not to USB)==&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Backup to other media (i.e. not to USB)|Backup to other media]]&lt;br /&gt;
&lt;br /&gt;
== Copying a single record from one database to another ==&lt;br /&gt;
 &lt;br /&gt;
You need to know the file name and record key of the record to be copied.&lt;br /&gt;
 &lt;br /&gt;
In this case the file is DEFINITIONS and the key is AGENCY.PARAMS&lt;br /&gt;
 &lt;br /&gt;
You can invent any old style 8.3 filename instead of C:\AGP.DAT in the following example&lt;br /&gt;
 &lt;br /&gt;
On the source computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DEFINITIONS AGENCY.PARAMS TO: (DOS C:\AGP.DAT)&lt;br /&gt;
&lt;br /&gt;
On the target computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DOS C:\AGP.DAT (ON) TO: (DEFINITIONS AGENCY.PARAMS)&lt;br /&gt;
&lt;br /&gt;
The (O) option is required to force overwrite of the existing &lt;br /&gt;
 &lt;br /&gt;
The (N) option means only copy if the target already exists. It is advisable to use it when you know that the target already exists to avoid misspellings in the command. It must be omitted if the target doesnt exist.&lt;br /&gt;
&lt;br /&gt;
== Allowing users temporary login as NEOSYS in maintenance mode ==&lt;br /&gt;
 &lt;br /&gt;
#Get them to login with any name even NEOSYS&lt;br /&gt;
#Get them to enter &amp;quot;?&amp;quot; for the pass without the quotes&lt;br /&gt;
#NEOSYS will give them a lock like &amp;quot;NEOSYS 123456&amp;quot; which they must give you. You should not log out until the next step is completed&lt;br /&gt;
#Follow the NEOSYS lock/key procedure using the full contents of the lock including the user name&lt;br /&gt;
(to allow access EXCEPT access to authorisation screen use a special number (not documented here) as the last number of the initial command)&lt;br /&gt;
#Give them the key and get them to enter and proceed&lt;br /&gt;
&lt;br /&gt;
== Configuring upload of photoshop &amp;quot;cs2&amp;quot; jpg files ==&lt;br /&gt;
&lt;br /&gt;
Photoshop version &amp;quot;cs2&amp;quot; produces jpg files that cannot be viewed in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
A solution is to rename the files extension from .jpg to .psjpg before uploading.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;psjpg&amp;quot; files are an invention of NEOSYS and IIS must be configured to handle .psjpg files as follows:&lt;br /&gt;
&lt;br /&gt;
Windows Server 2003 (doesnt work on XP)&lt;br /&gt;
&lt;br /&gt;
#Computer Management, Internet Information Server, Properties&lt;br /&gt;
#Click MIME Types&lt;br /&gt;
#Click New&lt;br /&gt;
#Extension: psjpg&lt;br /&gt;
#MIME Type: application/photoshop&lt;br /&gt;
#Click OK,OK,OK&lt;br /&gt;
#Restart IIS (Right click, All Tasks, Restart)&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1823</id>
		<title>Configuring NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1823"/>
		<updated>2014-11-30T06:39:06Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Clearing files in database ==&lt;br /&gt;
&lt;br /&gt;
This is to be done if you want to clean an old database or clean a training database so that a client can enter fresh data.&lt;br /&gt;
&lt;br /&gt;
These commands DO NOT reset the data to &amp;quot;factory settings&amp;quot; so for new installations you need to download a fresh BACKUP.ZIP file from the NEOSYS website.&lt;br /&gt;
&lt;br /&gt;
*Clear transactions F5 - CLEAROP (only clears transactions not reference files)&lt;br /&gt;
&lt;br /&gt;
*Clear all F5 - CLEARALL (rather nasty command because it clears all reference files as well)&lt;br /&gt;
&lt;br /&gt;
*Clear finance transactions F5 - CLEARACC&lt;br /&gt;
&lt;br /&gt;
== Clearing selected files in database ==&lt;br /&gt;
&lt;br /&gt;
This can be done if you want to reimport selected files. The flush index command MUST be performed after doing any clearing.&lt;br /&gt;
&lt;br /&gt;
WARNING This procedure must not be used if there are any transaction in the system that might use the files being cleared.&lt;br /&gt;
&lt;br /&gt;
WARNING Clearing individual files is error prone because other files might refer to the records you are clearing (referential integrity is not applied so dangling references may be created). For example, clearing suppliers without clearing vehicles in advance results in vehicles which have supplier codes that do not exist. Even if you reimport the suppliers, some supplier codes in the vehicles file may not be reimported leaving vehicles with problems.&lt;br /&gt;
&lt;br /&gt;
WARNING The opportunity to create problems that have no solution and that may only surface when the system is in operation is endless unless you think through the implications very very very carefully.&lt;br /&gt;
&lt;br /&gt;
*Flush Index		F5	FLUSH.INDEX (this command MUST be performed immediately after any data clearing)&lt;br /&gt;
&lt;br /&gt;
*Clear suppliers		F5	CLEARFILE SUPPLIERS&lt;br /&gt;
&lt;br /&gt;
*Clear vehicles		F5	CLEARFILE VEHICLES&lt;br /&gt;
&lt;br /&gt;
*Clear Payment Instruction F5    CLEARFIELD CLIENTS PAYMENT_INSTRUCTIONS (only clears the payment instruction from the client and brand file)&lt;br /&gt;
&lt;br /&gt;
== Mass updating database without data entry ==&lt;br /&gt;
&lt;br /&gt;
Warning: It is advisable that you take the approval of NEOSYS DBA or programmers before doing any of the following procedures. There is no protection whatsoever from damaging the database if you do not appreciate all the implications of any particular update. Common sense and caution must be used. If you damage a database then it may be, or with operation become, irretrievably damaged and require reconstruction from a backup causing possibly extreme finance damages to the owner of the data and consequences for yourself. You have been warned.&lt;br /&gt;
&lt;br /&gt;
There are many commands in maintenance mode that allow you to amend the database directly and without any record and without any ability to reverse changes.&lt;br /&gt;
&lt;br /&gt;
Normally, no record of the changes is made. All changes will appear to have been done by the last user at the time and date of the last normal user interface amendments.&lt;br /&gt;
&lt;br /&gt;
=== Available fields to clear or set ===&lt;br /&gt;
&lt;br /&gt;
#Client &amp;amp; Brand File: CLIENTS MARKET_CODE&lt;br /&gt;
#Client &amp;amp; Brand File: BRANDS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to clear a database field ===&lt;br /&gt;
&lt;br /&gt;
Assuming that a particular database field may be blank (i.e. not required for data entry) then you may clear a field as follows.&lt;br /&gt;
&lt;br /&gt;
Warning: There is nothing to stop you clearing a field that is mandatory and doing this may cause irrecoverable damage to the database.&lt;br /&gt;
&lt;br /&gt;
In the following example we wish to change all clients with market code “UAE to have market code blank.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to clear all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “UAE”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
&lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to set a database field ===&lt;br /&gt;
&lt;br /&gt;
In the following example we change all the clients where the market code is blank (has not been entered) to become “UAE”.&lt;br /&gt;
&lt;br /&gt;
Warning: You can set the market code to a market code that does not exist. This will cause various problems in the operation of the system but is probably not irrecoverable.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to set all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
 &lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE/UAE&lt;br /&gt;
&lt;br /&gt;
== Backup to other media (i.e. not to USB)==&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Backup to other media (i.e. not to USB)|Backup to other media]]&lt;br /&gt;
&lt;br /&gt;
== Copying a single record from one database to another ==&lt;br /&gt;
 &lt;br /&gt;
You need to know the file name and record key of the record to be copied.&lt;br /&gt;
 &lt;br /&gt;
In this case the file is DEFINITIONS and the key is AGENCY.PARAMS&lt;br /&gt;
 &lt;br /&gt;
You can invent any old style 8.3 filename instead of C:\AGP.DAT in the following example&lt;br /&gt;
 &lt;br /&gt;
On the source computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DEFINITIONS AGENCY.PARAMS TO: (DOS C:\AGP.DAT)&lt;br /&gt;
&lt;br /&gt;
On the target computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DOS C:\AGP.DAT (ON) TO: (DEFINITIONS AGENCY.PARAMS)&lt;br /&gt;
&lt;br /&gt;
The (O) option is required to force overwrite of the existing &lt;br /&gt;
 &lt;br /&gt;
The (N) option means only copy if the target already exists. It is advisable to use it when you know that the target already exists to avoid misspellings in the command. It must be omitted if the target doesnt exist.&lt;br /&gt;
&lt;br /&gt;
== Allowing users temporary login as NEOSYS in maintenance mode ==&lt;br /&gt;
 &lt;br /&gt;
#Get them to login with any name even NEOSYS&lt;br /&gt;
#Get them to enter &amp;quot;?&amp;quot; for the pass without the quotes&lt;br /&gt;
#NEOSYS will give them a lock like &amp;quot;NEOSYS 123456&amp;quot; which they must give you. You should not log out until the next step is completed&lt;br /&gt;
#Follow the NEOSYS lock/key procedure using the full contents of the lock including the user name&lt;br /&gt;
(to allow access EXCEPT access to authorisation screen use a special number (not documented here) as the last number of the initial command)&lt;br /&gt;
#Give them the key and get them to enter and proceed&lt;br /&gt;
&lt;br /&gt;
== Configuring upload of photoshop &amp;quot;cs2&amp;quot; jpg files ==&lt;br /&gt;
&lt;br /&gt;
Photoshop version &amp;quot;cs2&amp;quot; produces jpg files that cannot be viewed in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
A solution is to rename the files extension from .jpg to .psjpg before uploading.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;psjpg&amp;quot; files are an invention of NEOSYS and IIS must be configured to handle .psjpg files as follows:&lt;br /&gt;
&lt;br /&gt;
Windows Server 2003 (doesnt work on XP)&lt;br /&gt;
&lt;br /&gt;
#Computer Management, Internet Information Server, Properties&lt;br /&gt;
#Click MIME Types&lt;br /&gt;
#Click New&lt;br /&gt;
#Extension: psjpg&lt;br /&gt;
#MIME Type: application/photoshop&lt;br /&gt;
#Click OK,OK,OK&lt;br /&gt;
#Restart IIS (Right click, All Tasks, Restart)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Configuration File ==&lt;br /&gt;
&lt;br /&gt;
See [http://userwiki.neosys.com/index.php/System_Configuration_File System Configuration File]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1821</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1821"/>
		<updated>2014-11-26T12:25:26Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* A. Determine host and port and where to test from */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a virtual web directory ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; first step is to create a virtual directory called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click Default Web Site, neosys, NEOSYS, dll&lt;br /&gt;
# Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per NL1)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration.&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a virtual directory called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; This step requires a binding to be setup, so setup HTTP binding with a port number which is unique, unused and one greater than the previous port used in the series which is 8123 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
====For Mac Users to access Jobs and Timesheet====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; In the IIS Default Web Site create a another virtual directory called neosys2 linked to {{Client server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{Client server Installation Location}}data and {{Client server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; In the &amp;quot;clientname&amp;quot; website folder create another virtual directory called neosys2 linked to {{NEOSYS server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{NEOSYS server Installation Location}}data and {{NEOSYS server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
[[image:iis6.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Go under IIS&amp;gt;Sites&amp;gt;Clientname Website&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: &lt;br /&gt;
*For Client Server: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
*For WIN3: {{NEOSYS server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Editing the hosts file====&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Solving IIS error 500 on uploading ====&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client drectory eg d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to the next step to prevent SSL3 accidentally being enabled if https is installed in the server in future.&lt;br /&gt;
#Create a file called IISdisableSSL3.reg&lt;br /&gt;
#Open it and put the code in the section below.&lt;br /&gt;
#Accept to load info into the registry.&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server]&lt;br /&gt;
&amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
If https is enabled on the server/website and you are able to access the website via https using a browser, then you must be able to test for openssl on the same browsed host and port. You must also test this locally to ensure that the right server is being fixed. If the website is not public, then https must not be enabled, which means there is no reason for using cygwin openssl.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C. Check that you cannot CANNOT to https server using SSL3 ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1820</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1820"/>
		<updated>2014-11-26T06:03:02Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* B. Check that you cannot CANNOT to https server using SSL3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a virtual web directory ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; first step is to create a virtual directory called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click Default Web Site, neosys, NEOSYS, dll&lt;br /&gt;
# Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per NL1)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration.&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a virtual directory called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; This step requires a binding to be setup, so setup HTTP binding with a port number which is unique, unused and one greater than the previous port used in the series which is 8123 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
====For Mac Users to access Jobs and Timesheet====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; In the IIS Default Web Site create a another virtual directory called neosys2 linked to {{Client server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{Client server Installation Location}}data and {{Client server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; In the &amp;quot;clientname&amp;quot; website folder create another virtual directory called neosys2 linked to {{NEOSYS server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{NEOSYS server Installation Location}}data and {{NEOSYS server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
[[image:iis6.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Go under IIS&amp;gt;Sites&amp;gt;Clientname Website&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: &lt;br /&gt;
*For Client Server: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
*For WIN3: {{NEOSYS server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Editing the hosts file====&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Solving IIS error 500 on uploading ====&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client drectory eg d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to the next step to prevent SSL3 accidentally being enabled if https is installed in the server in future.&lt;br /&gt;
#Create a file called IISdisableSSL3.reg&lt;br /&gt;
#Open it and put the code in the section below.&lt;br /&gt;
#Accept to load info into the registry.&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server]&lt;br /&gt;
&amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
It is not possible for https to be enabled on the server/website and you can access the web site by browser on https and for the server not to be listening on the IIS configured port so if you cannot connect then you have not identified the correct host or port or cannot get to that host from your working host on that port number.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C. Check that you cannot CANNOT to https server using SSL3 ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1819</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1819"/>
		<updated>2014-11-26T06:02:37Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* A. Check you CAN connect to https server using TLS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a virtual web directory ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; first step is to create a virtual directory called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click Default Web Site, neosys, NEOSYS, dll&lt;br /&gt;
# Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per NL1)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration.&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a virtual directory called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; This step requires a binding to be setup, so setup HTTP binding with a port number which is unique, unused and one greater than the previous port used in the series which is 8123 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
====For Mac Users to access Jobs and Timesheet====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; In the IIS Default Web Site create a another virtual directory called neosys2 linked to {{Client server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{Client server Installation Location}}data and {{Client server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; In the &amp;quot;clientname&amp;quot; website folder create another virtual directory called neosys2 linked to {{NEOSYS server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{NEOSYS server Installation Location}}data and {{NEOSYS server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
[[image:iis6.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Go under IIS&amp;gt;Sites&amp;gt;Clientname Website&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: &lt;br /&gt;
*For Client Server: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
*For WIN3: {{NEOSYS server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Editing the hosts file====&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Solving IIS error 500 on uploading ====&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client drectory eg d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to the next step to prevent SSL3 accidentally being enabled if https is installed in the server in future.&lt;br /&gt;
#Create a file called IISdisableSSL3.reg&lt;br /&gt;
#Open it and put the code in the section below.&lt;br /&gt;
#Accept to load info into the registry.&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server]&lt;br /&gt;
&amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
It is not possible for https to be enabled on the server/website and you can access the web site by browser on https and for the server not to be listening on the IIS configured port so if you cannot connect then you have not identified the correct host or port or cannot get to that host from your working host on that port number.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Check that you cannot CANNOT to https server using SSL3 ===&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1818</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1818"/>
		<updated>2014-11-26T06:02:16Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Testing for IIS vulnerability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a virtual web directory ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; first step is to create a virtual directory called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click Default Web Site, neosys, NEOSYS, dll&lt;br /&gt;
# Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per NL1)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration.&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a virtual directory called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; This step requires a binding to be setup, so setup HTTP binding with a port number which is unique, unused and one greater than the previous port used in the series which is 8123 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
====For Mac Users to access Jobs and Timesheet====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; In the IIS Default Web Site create a another virtual directory called neosys2 linked to {{Client server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{Client server Installation Location}}data and {{Client server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; In the &amp;quot;clientname&amp;quot; website folder create another virtual directory called neosys2 linked to {{NEOSYS server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{NEOSYS server Installation Location}}data and {{NEOSYS server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
[[image:iis6.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Go under IIS&amp;gt;Sites&amp;gt;Clientname Website&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: &lt;br /&gt;
*For Client Server: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
*For WIN3: {{NEOSYS server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Editing the hosts file====&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Solving IIS error 500 on uploading ====&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client drectory eg d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to the next step to prevent SSL3 accidentally being enabled if https is installed in the server in future.&lt;br /&gt;
#Create a file called IISdisableSSL3.reg&lt;br /&gt;
#Open it and put the code in the section below.&lt;br /&gt;
#Accept to load info into the registry.&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server]&lt;br /&gt;
&amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
It is not possible for https to be enabled on the server/website and you can access the web site by browser on https and for the server not to be listening on the IIS configured port so if you cannot connect then you have not identified the correct host or port or cannot get to that host from your working host on that port number.&lt;br /&gt;
&lt;br /&gt;
=== A. Check you CAN connect to https server using TLS ===&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Check that you cannot CANNOT to https server using SSL3 ===&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1803</id>
		<title>Configuring NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1803"/>
		<updated>2014-11-13T13:19:03Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Clearing files in database ==&lt;br /&gt;
&lt;br /&gt;
This is to be done if you want to clean an old database or clean a training database so that a client can enter fresh data.&lt;br /&gt;
&lt;br /&gt;
These commands DO NOT reset the data to &amp;quot;factory settings&amp;quot; so for new installations you need to download a fresh BACKUP.ZIP file from the NEOSYS website.&lt;br /&gt;
&lt;br /&gt;
*Clear transactions F5 - CLEAROP (only clears transactions not reference files)&lt;br /&gt;
&lt;br /&gt;
*Clear all F5 - CLEARALL (rather nasty command because it clears all reference files as well)&lt;br /&gt;
&lt;br /&gt;
*Clear finance transactions F5 - CLEARACC&lt;br /&gt;
&lt;br /&gt;
== Clearing selected files in database ==&lt;br /&gt;
&lt;br /&gt;
This can be done if you want to reimport selected files. The flush index command MUST be performed after doing any clearing.&lt;br /&gt;
&lt;br /&gt;
WARNING This procedure must not be used if there are any transaction in the system that might use the files being cleared.&lt;br /&gt;
&lt;br /&gt;
WARNING Clearing individual files is error prone because other files might refer to the records you are clearing (referential integrity is not applied so dangling references may be created). For example, clearing suppliers without clearing vehicles in advance results in vehicles which have supplier codes that do not exist. Even if you reimport the suppliers, some supplier codes in the vehicles file may not be reimported leaving vehicles with problems.&lt;br /&gt;
&lt;br /&gt;
WARNING The opportunity to create problems that have no solution and that may only surface when the system is in operation is endless unless you think through the implications very very very carefully.&lt;br /&gt;
&lt;br /&gt;
*Flush Index		F5	FLUSH.INDEX (this command MUST be performed immediately after any data clearing)&lt;br /&gt;
&lt;br /&gt;
*Clear suppliers		F5	CLEARFILE SUPPLIERS&lt;br /&gt;
&lt;br /&gt;
*Clear vehicles		F5	CLEARFILE VEHICLES&lt;br /&gt;
&lt;br /&gt;
*Clear Payment Instruction F5    CLEARFIELD CLIENTS PAYMENT_INSTRUCTIONS (only clears the payment instruction from the client and brand file)&lt;br /&gt;
&lt;br /&gt;
== Mass updating database without data entry ==&lt;br /&gt;
&lt;br /&gt;
Warning: It is advisable that you take the approval of NEOSYS DBA or programmers before doing any of the following procedures. There is no protection whatsoever from damaging the database if you do not appreciate all the implications of any particular update. Common sense and caution must be used. If you damage a database then it may be, or with operation become, irretrievably damaged and require reconstruction from a backup causing possibly extreme finance damages to the owner of the data and consequences for yourself. You have been warned.&lt;br /&gt;
&lt;br /&gt;
There are many commands in maintenance mode that allow you to amend the database directly and without any record and without any ability to reverse changes.&lt;br /&gt;
&lt;br /&gt;
Normally, no record of the changes is made. All changes will appear to have been done by the last user at the time and date of the last normal user interface amendments.&lt;br /&gt;
&lt;br /&gt;
=== Available fields to clear or set ===&lt;br /&gt;
&lt;br /&gt;
#Client &amp;amp; Brand File: CLIENTS MARKET_CODE&lt;br /&gt;
#Client &amp;amp; Brand File: BRANDS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to clear a database field ===&lt;br /&gt;
&lt;br /&gt;
Assuming that a particular database field may be blank (i.e. not required for data entry) then you may clear a field as follows.&lt;br /&gt;
&lt;br /&gt;
Warning: There is nothing to stop you clearing a field that is mandatory and doing this may cause irrecoverable damage to the database.&lt;br /&gt;
&lt;br /&gt;
In the following example we wish to change all clients with market code “UAE to have market code blank.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to clear all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “UAE”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
&lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to set a database field ===&lt;br /&gt;
&lt;br /&gt;
In the following example we change all the clients where the market code is blank (has not been entered) to become “UAE”.&lt;br /&gt;
&lt;br /&gt;
Warning: You can set the market code to a market code that does not exist. This will cause various problems in the operation of the system but is probably not irrecoverable.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to set all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
 &lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE/UAE&lt;br /&gt;
&lt;br /&gt;
== Backup to other media (i.e. not to USB)==&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Backup to other media (i.e. not to USB)|Backup to other media]]&lt;br /&gt;
&lt;br /&gt;
== Copying a single record from one database to another ==&lt;br /&gt;
 &lt;br /&gt;
You need to know the file name and record key of the record to be copied.&lt;br /&gt;
 &lt;br /&gt;
In this case the file is DEFINITIONS and the key is AGENCY.PARAMS&lt;br /&gt;
 &lt;br /&gt;
You can invent any old style 8.3 filename instead of C:\AGP.DAT in the following example&lt;br /&gt;
 &lt;br /&gt;
On the source computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DEFINITIONS AGENCY.PARAMS TO: (DOS C:\AGP.DAT)&lt;br /&gt;
&lt;br /&gt;
On the target computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DOS C:\AGP.DAT (ON) TO: (DEFINITIONS AGENCY.PARAMS)&lt;br /&gt;
&lt;br /&gt;
The (O) option is required to force overwrite of the existing &lt;br /&gt;
 &lt;br /&gt;
The (N) option means only copy if the target already exists. It is advisable to use it when you know that the target already exists to avoid misspellings in the command. It must be omitted if the target doesnt exist.&lt;br /&gt;
&lt;br /&gt;
== Allowing users temporary login as NEOSYS in maintenance mode ==&lt;br /&gt;
 &lt;br /&gt;
#Get them to login with any name even NEOSYS&lt;br /&gt;
#Get them to enter &amp;quot;?&amp;quot; for the pass without the quotes&lt;br /&gt;
#NEOSYS will give them a lock like &amp;quot;NEOSYS 123456&amp;quot; which they must give you. You should not log out until the next step is completed&lt;br /&gt;
#Follow the NEOSYS lock/key procedure using the full contents of the lock including the user name&lt;br /&gt;
(to allow access EXCEPT access to authorisation screen use a special number (not documented here) as the last number of the initial command)&lt;br /&gt;
#Give them the key and get them to enter and proceed&lt;br /&gt;
&lt;br /&gt;
== Configuring upload of photoshop &amp;quot;cs2&amp;quot; jpg files ==&lt;br /&gt;
&lt;br /&gt;
Photoshop version &amp;quot;cs2&amp;quot; produces jpg files that cannot be viewed in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
A solution is to rename the files extension from .jpg to .psjpg before uploading.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;psjpg&amp;quot; files are an invention of NEOSYS and IIS must be configured to handle .psjpg files as follows:&lt;br /&gt;
&lt;br /&gt;
Windows Server 2003 (doesnt work on XP)&lt;br /&gt;
&lt;br /&gt;
#Computer Management, Internet Information Server, Properties&lt;br /&gt;
#Click MIME Types&lt;br /&gt;
#Click New&lt;br /&gt;
#Extension: psjpg&lt;br /&gt;
#MIME Type: application/photoshop&lt;br /&gt;
#Click OK,OK,OK&lt;br /&gt;
#Restart IIS (Right click, All Tasks, Restart)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Configuration File ==&lt;br /&gt;
=== Scope ===&lt;br /&gt;
&lt;br /&gt;
*All Installations&lt;br /&gt;
*Current Installation (default)&lt;br /&gt;
*Current Database&lt;br /&gt;
&lt;br /&gt;
You can configure most items at the above “scopes”. Any item configured on higher/broader scope has priority over the same item on a lower/narrower scope.&lt;br /&gt;
&lt;br /&gt;
Assigning higher priority to higher/broader scopes allows us to override any and all individual installations/databases configurations with a particular configuration of our choosing. However it does not allow us to set a default configuration for all installations/databases and then separately configure each one where desired. That would require NEOSYS to assign priority to lower/narrower scopes – which it doesn’t do.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1802</id>
		<title>Configuring NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1802"/>
		<updated>2014-11-13T13:18:14Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Reverted edits by Nikhil (talk) to last revision by Ruku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Clearing files in database ==&lt;br /&gt;
&lt;br /&gt;
This is to be done if you want to clean an old database or clean a training database so that a client can enter fresh data.&lt;br /&gt;
&lt;br /&gt;
These commands DO NOT reset the data to &amp;quot;factory settings&amp;quot; so for new installations you need to download a fresh BACKUP.ZIP file from the NEOSYS website.&lt;br /&gt;
&lt;br /&gt;
*Clear transactions F5 - CLEAROP (only clears transactions not reference files)&lt;br /&gt;
&lt;br /&gt;
*Clear all F5 - CLEARALL (rather nasty command because it clears all reference files as well)&lt;br /&gt;
&lt;br /&gt;
*Clear finance transactions F5 - CLEARACC&lt;br /&gt;
&lt;br /&gt;
== Clearing selected files in database ==&lt;br /&gt;
&lt;br /&gt;
This can be done if you want to reimport selected files. The flush index command MUST be performed after doing any clearing.&lt;br /&gt;
&lt;br /&gt;
WARNING This procedure must not be used if there are any transaction in the system that might use the files being cleared.&lt;br /&gt;
&lt;br /&gt;
WARNING Clearing individual files is error prone because other files might refer to the records you are clearing (referential integrity is not applied so dangling references may be created). For example, clearing suppliers without clearing vehicles in advance results in vehicles which have supplier codes that do not exist. Even if you reimport the suppliers, some supplier codes in the vehicles file may not be reimported leaving vehicles with problems.&lt;br /&gt;
&lt;br /&gt;
WARNING The opportunity to create problems that have no solution and that may only surface when the system is in operation is endless unless you think through the implications very very very carefully.&lt;br /&gt;
&lt;br /&gt;
*Flush Index		F5	FLUSH.INDEX (this command MUST be performed immediately after any data clearing)&lt;br /&gt;
&lt;br /&gt;
*Clear suppliers		F5	CLEARFILE SUPPLIERS&lt;br /&gt;
&lt;br /&gt;
*Clear vehicles		F5	CLEARFILE VEHICLES&lt;br /&gt;
&lt;br /&gt;
*Clear Payment Instruction F5    CLEARFIELD CLIENTS PAYMENT_INSTRUCTIONS (only clears the payment instruction from the client and brand file)&lt;br /&gt;
&lt;br /&gt;
== Mass updating database without data entry ==&lt;br /&gt;
&lt;br /&gt;
Warning: It is advisable that you take the approval of NEOSYS DBA or programmers before doing any of the following procedures. There is no protection whatsoever from damaging the database if you do not appreciate all the implications of any particular update. Common sense and caution must be used. If you damage a database then it may be, or with operation become, irretrievably damaged and require reconstruction from a backup causing possibly extreme finance damages to the owner of the data and consequences for yourself. You have been warned.&lt;br /&gt;
&lt;br /&gt;
There are many commands in maintenance mode that allow you to amend the database directly and without any record and without any ability to reverse changes.&lt;br /&gt;
&lt;br /&gt;
Normally, no record of the changes is made. All changes will appear to have been done by the last user at the time and date of the last normal user interface amendments.&lt;br /&gt;
&lt;br /&gt;
=== Available fields to clear or set ===&lt;br /&gt;
&lt;br /&gt;
#Client &amp;amp; Brand File: CLIENTS MARKET_CODE&lt;br /&gt;
#Client &amp;amp; Brand File: BRANDS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to clear a database field ===&lt;br /&gt;
&lt;br /&gt;
Assuming that a particular database field may be blank (i.e. not required for data entry) then you may clear a field as follows.&lt;br /&gt;
&lt;br /&gt;
Warning: There is nothing to stop you clearing a field that is mandatory and doing this may cause irrecoverable damage to the database.&lt;br /&gt;
&lt;br /&gt;
In the following example we wish to change all clients with market code “UAE to have market code blank.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to clear all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “UAE”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
&lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to set a database field ===&lt;br /&gt;
&lt;br /&gt;
In the following example we change all the clients where the market code is blank (has not been entered) to become “UAE”.&lt;br /&gt;
&lt;br /&gt;
Warning: You can set the market code to a market code that does not exist. This will cause various problems in the operation of the system but is probably not irrecoverable.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to set all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
 &lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE/UAE&lt;br /&gt;
&lt;br /&gt;
== Backup to other media (i.e. not to USB)==&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Backup to other media (i.e. not to USB)|Backup to other media]]&lt;br /&gt;
&lt;br /&gt;
== Configure Backup of Images on NEOSYS Server to the Client&#039;s Images Sub Directory ==&lt;br /&gt;
&lt;br /&gt;
You need to install a Patch for each NEOSYS Client. Go to the maintenance mode of each Client and type the following command :&lt;br /&gt;
&lt;br /&gt;
 INSTALL FILEMAN D:\(O)&lt;br /&gt;
&lt;br /&gt;
This will make each Client backup its Images to its own Sub Directory of Images. &lt;br /&gt;
&lt;br /&gt;
== Copying a single record from one database to another ==&lt;br /&gt;
 &lt;br /&gt;
You need to know the file name and record key of the record to be copied.&lt;br /&gt;
 &lt;br /&gt;
In this case the file is DEFINITIONS and the key is AGENCY.PARAMS&lt;br /&gt;
 &lt;br /&gt;
You can invent any old style 8.3 filename instead of C:\AGP.DAT in the following example&lt;br /&gt;
 &lt;br /&gt;
On the source computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DEFINITIONS AGENCY.PARAMS TO: (DOS C:\AGP.DAT)&lt;br /&gt;
&lt;br /&gt;
On the target computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DOS C:\AGP.DAT (ON) TO: (DEFINITIONS AGENCY.PARAMS)&lt;br /&gt;
&lt;br /&gt;
The (O) option is required to force overwrite of the existing &lt;br /&gt;
 &lt;br /&gt;
The (N) option means only copy if the target already exists. It is advisable to use it when you know that the target already exists to avoid misspellings in the command. It must be omitted if the target doesnt exist.&lt;br /&gt;
&lt;br /&gt;
== Allowing users temporary login as NEOSYS in maintenance mode ==&lt;br /&gt;
 &lt;br /&gt;
#Get them to login with any name even NEOSYS&lt;br /&gt;
#Get them to enter &amp;quot;?&amp;quot; for the pass without the quotes&lt;br /&gt;
#NEOSYS will give them a lock like &amp;quot;NEOSYS 123456&amp;quot; which they must give you. You should not log out until the next step is completed&lt;br /&gt;
#Follow the NEOSYS lock/key procedure using the full contents of the lock including the user name&lt;br /&gt;
(to allow access EXCEPT access to authorisation screen use a special number (not documented here) as the last number of the initial command)&lt;br /&gt;
#Give them the key and get them to enter and proceed&lt;br /&gt;
&lt;br /&gt;
== Configuring upload of photoshop &amp;quot;cs2&amp;quot; jpg files ==&lt;br /&gt;
&lt;br /&gt;
Photoshop version &amp;quot;cs2&amp;quot; produces jpg files that cannot be viewed in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
A solution is to rename the files extension from .jpg to .psjpg before uploading.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;psjpg&amp;quot; files are an invention of NEOSYS and IIS must be configured to handle .psjpg files as follows:&lt;br /&gt;
&lt;br /&gt;
Windows Server 2003 (doesnt work on XP)&lt;br /&gt;
&lt;br /&gt;
#Computer Management, Internet Information Server, Properties&lt;br /&gt;
#Click MIME Types&lt;br /&gt;
#Click New&lt;br /&gt;
#Extension: psjpg&lt;br /&gt;
#MIME Type: application/photoshop&lt;br /&gt;
#Click OK,OK,OK&lt;br /&gt;
#Restart IIS (Right click, All Tasks, Restart)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Configuration File ==&lt;br /&gt;
=== Scope ===&lt;br /&gt;
&lt;br /&gt;
*All Installations&lt;br /&gt;
*Current Installation (default)&lt;br /&gt;
*Current Database&lt;br /&gt;
&lt;br /&gt;
You can configure most items at the above “scopes”. Any item configured on higher/broader scope has priority over the same item on a lower/narrower scope.&lt;br /&gt;
&lt;br /&gt;
Assigning higher priority to higher/broader scopes allows us to override any and all individual installations/databases configurations with a particular configuration of our choosing. However it does not allow us to set a default configuration for all installations/databases and then separately configure each one where desired. That would require NEOSYS to assign priority to lower/narrower scopes – which it doesn’t do.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1801</id>
		<title>Configuring NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1801"/>
		<updated>2014-11-13T08:03:23Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Configure Backup of Uploads on NEOSYS hosted Server to a Client specific Sub Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Clearing files in database ==&lt;br /&gt;
&lt;br /&gt;
This is to be done if you want to clean an old database or clean a training database so that a client can enter fresh data.&lt;br /&gt;
&lt;br /&gt;
These commands DO NOT reset the data to &amp;quot;factory settings&amp;quot; so for new installations you need to download a fresh BACKUP.ZIP file from the NEOSYS website.&lt;br /&gt;
&lt;br /&gt;
*Clear transactions F5 - CLEAROP (only clears transactions not reference files)&lt;br /&gt;
&lt;br /&gt;
*Clear all F5 - CLEARALL (rather nasty command because it clears all reference files as well)&lt;br /&gt;
&lt;br /&gt;
*Clear finance transactions F5 - CLEARACC&lt;br /&gt;
&lt;br /&gt;
== Clearing selected files in database ==&lt;br /&gt;
&lt;br /&gt;
This can be done if you want to reimport selected files. The flush index command MUST be performed after doing any clearing.&lt;br /&gt;
&lt;br /&gt;
WARNING This procedure must not be used if there are any transaction in the system that might use the files being cleared.&lt;br /&gt;
&lt;br /&gt;
WARNING Clearing individual files is error prone because other files might refer to the records you are clearing (referential integrity is not applied so dangling references may be created). For example, clearing suppliers without clearing vehicles in advance results in vehicles which have supplier codes that do not exist. Even if you reimport the suppliers, some supplier codes in the vehicles file may not be reimported leaving vehicles with problems.&lt;br /&gt;
&lt;br /&gt;
WARNING The opportunity to create problems that have no solution and that may only surface when the system is in operation is endless unless you think through the implications very very very carefully.&lt;br /&gt;
&lt;br /&gt;
*Flush Index		F5	FLUSH.INDEX (this command MUST be performed immediately after any data clearing)&lt;br /&gt;
&lt;br /&gt;
*Clear suppliers		F5	CLEARFILE SUPPLIERS&lt;br /&gt;
&lt;br /&gt;
*Clear vehicles		F5	CLEARFILE VEHICLES&lt;br /&gt;
&lt;br /&gt;
*Clear Payment Instruction F5    CLEARFIELD CLIENTS PAYMENT_INSTRUCTIONS (only clears the payment instruction from the client and brand file)&lt;br /&gt;
&lt;br /&gt;
== Mass updating database without data entry ==&lt;br /&gt;
&lt;br /&gt;
Warning: It is advisable that you take the approval of NEOSYS DBA or programmers before doing any of the following procedures. There is no protection whatsoever from damaging the database if you do not appreciate all the implications of any particular update. Common sense and caution must be used. If you damage a database then it may be, or with operation become, irretrievably damaged and require reconstruction from a backup causing possibly extreme finance damages to the owner of the data and consequences for yourself. You have been warned.&lt;br /&gt;
&lt;br /&gt;
There are many commands in maintenance mode that allow you to amend the database directly and without any record and without any ability to reverse changes.&lt;br /&gt;
&lt;br /&gt;
Normally, no record of the changes is made. All changes will appear to have been done by the last user at the time and date of the last normal user interface amendments.&lt;br /&gt;
&lt;br /&gt;
=== Available fields to clear or set ===&lt;br /&gt;
&lt;br /&gt;
#Client &amp;amp; Brand File: CLIENTS MARKET_CODE&lt;br /&gt;
#Client &amp;amp; Brand File: BRANDS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to clear a database field ===&lt;br /&gt;
&lt;br /&gt;
Assuming that a particular database field may be blank (i.e. not required for data entry) then you may clear a field as follows.&lt;br /&gt;
&lt;br /&gt;
Warning: There is nothing to stop you clearing a field that is mandatory and doing this may cause irrecoverable damage to the database.&lt;br /&gt;
&lt;br /&gt;
In the following example we wish to change all clients with market code “UAE to have market code blank.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to clear all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “UAE”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
&lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to set a database field ===&lt;br /&gt;
&lt;br /&gt;
In the following example we change all the clients where the market code is blank (has not been entered) to become “UAE”.&lt;br /&gt;
&lt;br /&gt;
Warning: You can set the market code to a market code that does not exist. This will cause various problems in the operation of the system but is probably not irrecoverable.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to set all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
 &lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE/UAE&lt;br /&gt;
&lt;br /&gt;
== Backup to other media (i.e. not to USB)==&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Backup to other media (i.e. not to USB)|Backup to other media]]&lt;br /&gt;
&lt;br /&gt;
== Configure Backup of Uploads on NEOSYS hosted Server to a Client specific Sub Directory ==&lt;br /&gt;
&lt;br /&gt;
Install the following patch and the system will backup to its own client specific sub directory under images folder. Go to the maintenance mode of each Client and type the following command&lt;br /&gt;
&lt;br /&gt;
 INSTALL FILEMAN D:\(O)&lt;br /&gt;
&lt;br /&gt;
== Copying a single record from one database to another ==&lt;br /&gt;
 &lt;br /&gt;
You need to know the file name and record key of the record to be copied.&lt;br /&gt;
 &lt;br /&gt;
In this case the file is DEFINITIONS and the key is AGENCY.PARAMS&lt;br /&gt;
 &lt;br /&gt;
You can invent any old style 8.3 filename instead of C:\AGP.DAT in the following example&lt;br /&gt;
 &lt;br /&gt;
On the source computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DEFINITIONS AGENCY.PARAMS TO: (DOS C:\AGP.DAT)&lt;br /&gt;
&lt;br /&gt;
On the target computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DOS C:\AGP.DAT (ON) TO: (DEFINITIONS AGENCY.PARAMS)&lt;br /&gt;
&lt;br /&gt;
The (O) option is required to force overwrite of the existing &lt;br /&gt;
 &lt;br /&gt;
The (N) option means only copy if the target already exists. It is advisable to use it when you know that the target already exists to avoid misspellings in the command. It must be omitted if the target doesnt exist.&lt;br /&gt;
&lt;br /&gt;
== Allowing users temporary login as NEOSYS in maintenance mode ==&lt;br /&gt;
 &lt;br /&gt;
#Get them to login with any name even NEOSYS&lt;br /&gt;
#Get them to enter &amp;quot;?&amp;quot; for the pass without the quotes&lt;br /&gt;
#NEOSYS will give them a lock like &amp;quot;NEOSYS 123456&amp;quot; which they must give you. You should not log out until the next step is completed&lt;br /&gt;
#Follow the NEOSYS lock/key procedure using the full contents of the lock including the user name&lt;br /&gt;
(to allow access EXCEPT access to authorisation screen use a special number (not documented here) as the last number of the initial command)&lt;br /&gt;
#Give them the key and get them to enter and proceed&lt;br /&gt;
&lt;br /&gt;
== Configuring upload of photoshop &amp;quot;cs2&amp;quot; jpg files ==&lt;br /&gt;
&lt;br /&gt;
Photoshop version &amp;quot;cs2&amp;quot; produces jpg files that cannot be viewed in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
A solution is to rename the files extension from .jpg to .psjpg before uploading.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;psjpg&amp;quot; files are an invention of NEOSYS and IIS must be configured to handle .psjpg files as follows:&lt;br /&gt;
&lt;br /&gt;
Windows Server 2003 (doesnt work on XP)&lt;br /&gt;
&lt;br /&gt;
#Computer Management, Internet Information Server, Properties&lt;br /&gt;
#Click MIME Types&lt;br /&gt;
#Click New&lt;br /&gt;
#Extension: psjpg&lt;br /&gt;
#MIME Type: application/photoshop&lt;br /&gt;
#Click OK,OK,OK&lt;br /&gt;
#Restart IIS (Right click, All Tasks, Restart)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Configuration File ==&lt;br /&gt;
=== Scope ===&lt;br /&gt;
&lt;br /&gt;
*All Installations&lt;br /&gt;
*Current Installation (default)&lt;br /&gt;
*Current Database&lt;br /&gt;
&lt;br /&gt;
You can configure most items at the above “scopes”. Any item configured on higher/broader scope has priority over the same item on a lower/narrower scope.&lt;br /&gt;
&lt;br /&gt;
Assigning higher priority to higher/broader scopes allows us to override any and all individual installations/databases configurations with a particular configuration of our choosing. However it does not allow us to set a default configuration for all installations/databases and then separately configure each one where desired. That would require NEOSYS to assign priority to lower/narrower scopes – which it doesn’t do.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1800</id>
		<title>Implementing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1800"/>
		<updated>2014-11-13T07:30:53Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Undo revision 1799 by Nikhil (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Set up the System Configuration File==&lt;br /&gt;
 &lt;br /&gt;
#[[Setting_up_HTTPS#Setting_up_HTTPS_for_installations_with_more_than_1_database| In case of multi-database installations]], configure URL/Web Address to access NEOSYS in the System Configuration File of each database. The first web URL is also used Timesheet Approver emails.&lt;br /&gt;
#Set up [http://userwiki.neosys.com/index.php/System_Configuration_File#General Email Domains] and [http://userwiki.neosys.com/index.php/System_Configuration_File#General IP Numbers]. &lt;br /&gt;
&lt;br /&gt;
==Setting up a new company in the new database==&lt;br /&gt;
Refer to the [http://userwiki.neosys.com/index.php/Setting_up_multi_company_installations_/_Setting_up_a_new_company#Draft_email_requesting_info_required_to_add_new_company_to_existing_database sample email for New Company creation in existing Database/New Database] &lt;br /&gt;
&lt;br /&gt;
Once the new company is added to the database:&lt;br /&gt;
#Delete Startup Company from the list of companies in the database. To delete Startup company see [[Configuring_NEOSYS_Finance_System#How_to_delete_a_company_from_the_dataset.3F|How to delete a company]]&#039;&#039;&#039;&lt;br /&gt;
#Delete “Client X” from the Client and Brand File&lt;br /&gt;
&lt;br /&gt;
Change the system mark for each of the new databases that were created. See [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Configuring_Client_Security_mark Configuring System Mark]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1799</id>
		<title>Implementing NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Implementing_NEOSYS&amp;diff=1799"/>
		<updated>2014-11-12T13:18:54Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Set up the System Configuration File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Set up the System Configuration File==&lt;br /&gt;
 &lt;br /&gt;
*[[Setting_up_HTTPS#Setting_up_HTTPS_for_installations_with_more_than_1_database| In case of multi-database installations]], configure URL/Web Address to access NEOSYS in the System Configuration File of each database. The first web URL is also used Timesheet Approver emails.&lt;br /&gt;
*Set up [http://userwiki.neosys.com/index.php/System_Configuration_File#General Email Domains] and [http://userwiki.neosys.com/index.php/System_Configuration_File#General IP Numbers]&lt;br /&gt;
*Set up Backup Drive for Data and Uploads. See [http://userwiki.neosys.com/index.php/System_Configuration_File#Automated_Backup Configure Backup]. For clients on NEOSYS hosted servers run FILEMAN in Maintenance Window so that Uploads are backed up under client specific folders. See [http://techwiki.neosys.com/index.php/Configuring_NEOSYS_Generally#Configure_Backup_of_Uploads_on_NEOSYS_hosted_Server_to_a_Client_specific_Sub_Directory Configure Backup of Uploads on NEOSYS hosted server]&lt;br /&gt;
&lt;br /&gt;
==Setting up a new company in the new database==&lt;br /&gt;
Refer to the [http://userwiki.neosys.com/index.php/Setting_up_multi_company_installations_/_Setting_up_a_new_company#Draft_email_requesting_info_required_to_add_new_company_to_existing_database sample email for New Company creation in existing Database/New Database] &lt;br /&gt;
&lt;br /&gt;
Once the new company is added to the database:&lt;br /&gt;
#Delete Startup Company from the list of companies in the database. To delete Startup company see [[Configuring_NEOSYS_Finance_System#How_to_delete_a_company_from_the_dataset.3F|How to delete a company]]&#039;&#039;&#039;&lt;br /&gt;
#Delete “Client X” from the Client and Brand File&lt;br /&gt;
&lt;br /&gt;
Change the system mark for each of the new databases that were created. See [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Configuring_Client_Security_mark Configuring System Mark]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1798</id>
		<title>Configuring NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_Generally&amp;diff=1798"/>
		<updated>2014-11-12T13:09:09Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Configure Backup of Images on NEOSYS Server to the Client&amp;#039;s Images Sub Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Clearing files in database ==&lt;br /&gt;
&lt;br /&gt;
This is to be done if you want to clean an old database or clean a training database so that a client can enter fresh data.&lt;br /&gt;
&lt;br /&gt;
These commands DO NOT reset the data to &amp;quot;factory settings&amp;quot; so for new installations you need to download a fresh BACKUP.ZIP file from the NEOSYS website.&lt;br /&gt;
&lt;br /&gt;
*Clear transactions F5 - CLEAROP (only clears transactions not reference files)&lt;br /&gt;
&lt;br /&gt;
*Clear all F5 - CLEARALL (rather nasty command because it clears all reference files as well)&lt;br /&gt;
&lt;br /&gt;
*Clear finance transactions F5 - CLEARACC&lt;br /&gt;
&lt;br /&gt;
== Clearing selected files in database ==&lt;br /&gt;
&lt;br /&gt;
This can be done if you want to reimport selected files. The flush index command MUST be performed after doing any clearing.&lt;br /&gt;
&lt;br /&gt;
WARNING This procedure must not be used if there are any transaction in the system that might use the files being cleared.&lt;br /&gt;
&lt;br /&gt;
WARNING Clearing individual files is error prone because other files might refer to the records you are clearing (referential integrity is not applied so dangling references may be created). For example, clearing suppliers without clearing vehicles in advance results in vehicles which have supplier codes that do not exist. Even if you reimport the suppliers, some supplier codes in the vehicles file may not be reimported leaving vehicles with problems.&lt;br /&gt;
&lt;br /&gt;
WARNING The opportunity to create problems that have no solution and that may only surface when the system is in operation is endless unless you think through the implications very very very carefully.&lt;br /&gt;
&lt;br /&gt;
*Flush Index		F5	FLUSH.INDEX (this command MUST be performed immediately after any data clearing)&lt;br /&gt;
&lt;br /&gt;
*Clear suppliers		F5	CLEARFILE SUPPLIERS&lt;br /&gt;
&lt;br /&gt;
*Clear vehicles		F5	CLEARFILE VEHICLES&lt;br /&gt;
&lt;br /&gt;
*Clear Payment Instruction F5    CLEARFIELD CLIENTS PAYMENT_INSTRUCTIONS (only clears the payment instruction from the client and brand file)&lt;br /&gt;
&lt;br /&gt;
== Mass updating database without data entry ==&lt;br /&gt;
&lt;br /&gt;
Warning: It is advisable that you take the approval of NEOSYS DBA or programmers before doing any of the following procedures. There is no protection whatsoever from damaging the database if you do not appreciate all the implications of any particular update. Common sense and caution must be used. If you damage a database then it may be, or with operation become, irretrievably damaged and require reconstruction from a backup causing possibly extreme finance damages to the owner of the data and consequences for yourself. You have been warned.&lt;br /&gt;
&lt;br /&gt;
There are many commands in maintenance mode that allow you to amend the database directly and without any record and without any ability to reverse changes.&lt;br /&gt;
&lt;br /&gt;
Normally, no record of the changes is made. All changes will appear to have been done by the last user at the time and date of the last normal user interface amendments.&lt;br /&gt;
&lt;br /&gt;
=== Available fields to clear or set ===&lt;br /&gt;
&lt;br /&gt;
#Client &amp;amp; Brand File: CLIENTS MARKET_CODE&lt;br /&gt;
#Client &amp;amp; Brand File: BRANDS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to clear a database field ===&lt;br /&gt;
&lt;br /&gt;
Assuming that a particular database field may be blank (i.e. not required for data entry) then you may clear a field as follows.&lt;br /&gt;
&lt;br /&gt;
Warning: There is nothing to stop you clearing a field that is mandatory and doing this may cause irrecoverable damage to the database.&lt;br /&gt;
&lt;br /&gt;
In the following example we wish to change all clients with market code “UAE to have market code blank.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to clear all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “UAE”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
&lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE&lt;br /&gt;
&lt;br /&gt;
=== How to set a database field ===&lt;br /&gt;
&lt;br /&gt;
In the following example we change all the clients where the market code is blank (has not been entered) to become “UAE”.&lt;br /&gt;
&lt;br /&gt;
Warning: You can set the market code to a market code that does not exist. This will cause various problems in the operation of the system but is probably not irrecoverable.&lt;br /&gt;
&lt;br /&gt;
First, if you don’t want to set all records, “select” the required records.&lt;br /&gt;
&lt;br /&gt;
 SELECT CLIENTS WITH MARKET_CODE “”&lt;br /&gt;
&lt;br /&gt;
After a period of time, depending on the number of records in the file, it should briefly state the number of records selected and then return to the command prompt.&lt;br /&gt;
&lt;br /&gt;
WARNING: If no records have been selected then ALL records will be updated by the following command!&lt;br /&gt;
 &lt;br /&gt;
 CLEARFIELD CLIENTS MARKET_CODE/UAE&lt;br /&gt;
&lt;br /&gt;
== Backup to other media (i.e. not to USB)==&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore#Backup to other media (i.e. not to USB)|Backup to other media]]&lt;br /&gt;
&lt;br /&gt;
== Configure Backup of Uploads on NEOSYS hosted Server to a Client specific Sub Directory ==&lt;br /&gt;
&lt;br /&gt;
Install the following patch and the system will backup to its own client specific sub directory under images folder. Go to the maintenance mode of each Client and type the following command :&lt;br /&gt;
&lt;br /&gt;
 INSTALL FILEMAN X:\(O)&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;X:\&#039;&#039;&#039; is the drive configured for Backup of Uploads in the System Configuration File. See [http://userwiki.neosys.com/index.php/System_Configuration_File#Uploads Configure Backup of Uploads]&lt;br /&gt;
&lt;br /&gt;
== Copying a single record from one database to another ==&lt;br /&gt;
 &lt;br /&gt;
You need to know the file name and record key of the record to be copied.&lt;br /&gt;
 &lt;br /&gt;
In this case the file is DEFINITIONS and the key is AGENCY.PARAMS&lt;br /&gt;
 &lt;br /&gt;
You can invent any old style 8.3 filename instead of C:\AGP.DAT in the following example&lt;br /&gt;
 &lt;br /&gt;
On the source computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DEFINITIONS AGENCY.PARAMS TO: (DOS C:\AGP.DAT)&lt;br /&gt;
&lt;br /&gt;
On the target computer:&lt;br /&gt;
 &lt;br /&gt;
 F5&lt;br /&gt;
 COPY DOS C:\AGP.DAT (ON) TO: (DEFINITIONS AGENCY.PARAMS)&lt;br /&gt;
&lt;br /&gt;
The (O) option is required to force overwrite of the existing &lt;br /&gt;
 &lt;br /&gt;
The (N) option means only copy if the target already exists. It is advisable to use it when you know that the target already exists to avoid misspellings in the command. It must be omitted if the target doesnt exist.&lt;br /&gt;
&lt;br /&gt;
== Allowing users temporary login as NEOSYS in maintenance mode ==&lt;br /&gt;
 &lt;br /&gt;
#Get them to login with any name even NEOSYS&lt;br /&gt;
#Get them to enter &amp;quot;?&amp;quot; for the pass without the quotes&lt;br /&gt;
#NEOSYS will give them a lock like &amp;quot;NEOSYS 123456&amp;quot; which they must give you. You should not log out until the next step is completed&lt;br /&gt;
#Follow the NEOSYS lock/key procedure using the full contents of the lock including the user name&lt;br /&gt;
(to allow access EXCEPT access to authorisation screen use a special number (not documented here) as the last number of the initial command)&lt;br /&gt;
#Give them the key and get them to enter and proceed&lt;br /&gt;
&lt;br /&gt;
== Configuring upload of photoshop &amp;quot;cs2&amp;quot; jpg files ==&lt;br /&gt;
&lt;br /&gt;
Photoshop version &amp;quot;cs2&amp;quot; produces jpg files that cannot be viewed in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
A solution is to rename the files extension from .jpg to .psjpg before uploading.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;psjpg&amp;quot; files are an invention of NEOSYS and IIS must be configured to handle .psjpg files as follows:&lt;br /&gt;
&lt;br /&gt;
Windows Server 2003 (doesnt work on XP)&lt;br /&gt;
&lt;br /&gt;
#Computer Management, Internet Information Server, Properties&lt;br /&gt;
#Click MIME Types&lt;br /&gt;
#Click New&lt;br /&gt;
#Extension: psjpg&lt;br /&gt;
#MIME Type: application/photoshop&lt;br /&gt;
#Click OK,OK,OK&lt;br /&gt;
#Restart IIS (Right click, All Tasks, Restart)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Configuration File ==&lt;br /&gt;
=== Scope ===&lt;br /&gt;
&lt;br /&gt;
*All Installations&lt;br /&gt;
*Current Installation (default)&lt;br /&gt;
*Current Database&lt;br /&gt;
&lt;br /&gt;
You can configure most items at the above “scopes”. Any item configured on higher/broader scope has priority over the same item on a lower/narrower scope.&lt;br /&gt;
&lt;br /&gt;
Assigning higher priority to higher/broader scopes allows us to override any and all individual installations/databases configurations with a particular configuration of our choosing. However it does not allow us to set a default configuration for all installations/databases and then separately configure each one where desired. That would require NEOSYS to assign priority to lower/narrower scopes – which it doesn’t do.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1793</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=1793"/>
		<updated>2014-11-06T09:01:57Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a virtual web directory ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; first step is to create a virtual directory called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NL1 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nl1 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click Default Web Site, neosys, NEOSYS, dll&lt;br /&gt;
# Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per NL1)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration.&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a virtual directory called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; This step requires a binding to be setup, so setup HTTP binding with a port number which is unique, unused and one greater than the previous port used in the series which is 8123 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
====For Mac Users to access Jobs and Timesheet====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; In the IIS Default Web Site create a another virtual directory called neosys2 linked to {{Client server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{Client server Installation Location}}data and {{Client server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; In the &amp;quot;clientname&amp;quot; website folder create another virtual directory called neosys2 linked to {{NEOSYS server Installation Location}}neosys.w3c. Under neosys2 virtual directory create 2 more virtual directories for data and images which are linked to {{NEOSYS server Installation Location}}data and {{NEOSYS server Installation Location}}images respectively&lt;br /&gt;
&lt;br /&gt;
[[image:iis6.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Go under IIS&amp;gt;Sites&amp;gt;Clientname Website&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: &lt;br /&gt;
*For Client Server: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
*For WIN3: {{NEOSYS server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Editing the hosts file====&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Solving IIS error 500 on uploading ====&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client drectory eg d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#check if the web server is vulnerable (see section below)&lt;br /&gt;
#continue if vulnerable, stop if not&lt;br /&gt;
#create a file called IISdisableSSL3.reg&lt;br /&gt;
#open it&lt;br /&gt;
#accept to load info into the registry&lt;br /&gt;
#reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server]&lt;br /&gt;
&amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
&lt;br /&gt;
In a linux command prompt eg nagios login and replacing $HOST and $PORT with&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 4430&lt;br /&gt;
&lt;br /&gt;
=== A. Check you CAN connect to https server using TLS ===&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Check that you cannot CANNOT to https server using SSL3 ===&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=File:IE_options.jpg&amp;diff=1792</id>
		<title>File:IE options.jpg</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=File:IE_options.jpg&amp;diff=1792"/>
		<updated>2014-11-06T09:00:47Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Procedures&amp;diff=1791</id>
		<title>Procedures</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Procedures&amp;diff=1791"/>
		<updated>2014-11-06T07:36:20Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Teamviewer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are procedures to be followed by Support Staff in respect to various technical matters in day to day operations of client issues.&lt;br /&gt;
&lt;br /&gt;
== Handling Clients with Overdue Invoice ==&lt;br /&gt;
In order to maintain good payment speed by clients NEOSYS needs to restrict support to clients that dont pay their bills on time, however the degree of restriction needs to depend on an intimate knowledge of the client which cannot be expected from all NEOSYS support staff. Therefore we will use a simple escalation policy as follows:&lt;br /&gt;
&lt;br /&gt;
=== Overdue Support List ===&lt;br /&gt;
NEOSYS SUPPORT MANAGERS WILL maintain an overdue list on a whiteboard visible to all support staff. Generally clients will go on the list immediately when their invoice is overdue and come off only after satisfactory commitment to pay have been obtained.&lt;br /&gt;
&lt;br /&gt;
NEOSYS SUPPORT STAFF WILL discretely refer any calls for support from client on the overdue list to support managers for handling.&lt;br /&gt;
&lt;br /&gt;
Managers may well instruct support to provide support on a case by case basis even if clients are on the overdue list. Being on the overdue list does not necessarily indicate a major issue with accounts&lt;br /&gt;
&lt;br /&gt;
In case clients pressurize NEOSYS staff to provide support then the support staff must inform them that there is an issue with their account and that their request had been forwarded to the manager.&lt;br /&gt;
&lt;br /&gt;
For the first week only of each quarter of the year, normal support should be provided for server failures and backup failures but nothing else.&lt;br /&gt;
&lt;br /&gt;
== Handling Links and Email Attachments ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DO NOT TRUST ANY LINK OR ATTACHMENT IN ANY EMAIL EVEN FROM HIGHLY TRUSTED PEOPLE OR ORGANISATIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These days you can no longer trust links or attachments in emails from anybody - even emails from highly trusted people like your bank.&lt;br /&gt;
&lt;br /&gt;
If a personal computer or intermediate email server is hacked then even genuine emails sent out from it can be infected and modified in a hidden way that can result in the recipient being infected if they click or open anything in the email.&lt;br /&gt;
&lt;br /&gt;
Therefore you should know and understand how to avoid, as far as possible, getting tricked and infected via emails.&lt;br /&gt;
&lt;br /&gt;
Malware authors generally rely on the fact that most people devote no time at all to security precautions so a moderate cautious approach, slowing down a little to spending some time on security, even where it is apparently not required, is enough to defeat most attacks.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The links in an email, even from someone you know and trust, can LIE to you about what website they will open and you may be taken to infected web sites that will attempt to infect your computer.&lt;br /&gt;
&lt;br /&gt;
WHAT LINK/WEBSITE WILL BE OPENED MAY NOT BE WHAT IS SAYS IN THE BODY OF YOUR EMAIL!&lt;br /&gt;
&lt;br /&gt;
Therefore, to use a link in any and all emails, first hover your cursor over it and check the bottom of the screen where you can usually see exactly what website will be opened, or, to be more sure exactly what web site you are opening do not click links in emails at all. COPY/PASTE THE LINK TO YOUR BROWSER&lt;br /&gt;
&lt;br /&gt;
Make sure you know and trust the web site being opened.&lt;br /&gt;
&lt;br /&gt;
#Carefully inspect the spelling of the domain name to avoid tricky look-alike fraudulent links eg hcsb.com instead of hsbc.com&lt;br /&gt;
#If you do not personally know the website then get independent confirmation from the sender. Reply to the email so that the sender can check the link you received has not been tampered with.&lt;br /&gt;
&lt;br /&gt;
=== Attachments ===&lt;br /&gt;
&lt;br /&gt;
There is no way to determine if an attachment, even from someone you know, has not been infected and is therefore dangerous. The only protection is to rely on anti-virus/anti-malware software in your computer.&lt;br /&gt;
&lt;br /&gt;
You can check the names and file types/extensions of attached files to spot any obviously strange or unexpected attachments but this is not very effective.&lt;br /&gt;
&lt;br /&gt;
Be careful that if there are a lot of attached files not to assume that all are safe because the majority are unsafe.&lt;br /&gt;
&lt;br /&gt;
==Client Contact Report Policy==&lt;br /&gt;
&lt;br /&gt;
Ensure that Client contact reports are sent to your manager within 24 hours of the meeting. &lt;br /&gt;
&lt;br /&gt;
== Client Communications ==&lt;br /&gt;
&lt;br /&gt;
If issues become contentious then voice, phone call or chat is REQUIRED. Emails are NOT sufficient.&lt;br /&gt;
&lt;br /&gt;
If not possible to contact for any reason then an email MUST be sent stating so and suggesting or requesting a time to connect.&lt;br /&gt;
&lt;br /&gt;
Every significant voice, phone or chat conversation MUST be followed up with an email confirming at least the jist of the communication.&lt;br /&gt;
&lt;br /&gt;
cc Client managers (AND/OR BCC NEOSYS Managers) MAY be done if thought to be useful and/or appropriate.&lt;br /&gt;
&lt;br /&gt;
== Client Password Policy ==&lt;br /&gt;
All client user passwords, including their initial one, are to be obtained via the user&#039;s email address using the password reminder/reset button on the login screen. [http://userwiki.neosys.com/index.php/Using_NEOSYS_Generally#What_is_NEOSYS_password_policy.3F  (NEOSYS password policy)]&lt;br /&gt;
&lt;br /&gt;
NEOSYS staff should never know users passwords therefore NEOSYS will not obtain and grant user passwords. The reason for this is that in the event that users lose their passwords to other people who then login unauthorised then suspicion could fall on the NEOSYS staff who know their password. &lt;br /&gt;
&lt;br /&gt;
All parties concerned, including client management, client users and NEOSYS support staff, benefit greatly from trusting that if something in a NEOSYS database is registered as having been done by a particular user then it was not in fact somehow done by NEOSYS support staff. Nothing should be done that would break such fundamental trust. To achieve this, NEOSYS support staff must never log in as particular users, never ask for users passwords and generally enforce the idea that all work logged as being done by users IS done by users.&lt;br /&gt;
&lt;br /&gt;
Very limited amounts of work by NEOSYS support staff either in person or remotely using teamviewer is acceptable while a user is logged as long as the user login was performed by the user themselves, the user is present and the user specifically agrees with the work being done.&lt;br /&gt;
&lt;br /&gt;
=== Support requests from ordinary client users ===&lt;br /&gt;
Any support requests concerning inability to obtain passwords will be forwarded to known skilled users on the client staff since this is the most efficient (not fastest) way to handle such issues.&lt;br /&gt;
&lt;br /&gt;
=== Support requests from senior client management ===&lt;br /&gt;
Any support requests concerning inability to obtain passwords by senior client management users shall be handled directly by NEOSYS support staff in any way convenient to resolve the issue in the quickest possible time rather than the most efficient.&lt;br /&gt;
&lt;br /&gt;
Bearing in mind that NEOSYS staff should never know user&#039;s passwords this will probably involve NEOSYS staff using the Password Reminder/Reset button to send a new password to the user.&lt;br /&gt;
&lt;br /&gt;
=== User Defined Passwords ===&lt;br /&gt;
NEOSYS will provide user defined passwords in very special cases which must be pre-approved case by case by NEOSYS management. NEOSYS will not approve this due to the reasons mentioned [[Procedures#Client_Password_Policy|here]].&lt;br /&gt;
&lt;br /&gt;
Currently this permission has only been granted to one NEOSYS client with several hundred of databases.&lt;br /&gt;
&lt;br /&gt;
== Handling client issues and requests==&lt;br /&gt;
&lt;br /&gt;
All support issues must be dealt with through phone/email/chat. Support Staff can schedule client visits for User Training but should not schedule client visits solely for providing support for petty issues. &lt;br /&gt;
&lt;br /&gt;
=== Handling users who login with other people&#039;s NEOSYS usercodes ===&lt;br /&gt;
&lt;br /&gt;
This can cause a lot of confusion in both the client and NEOSYS support. It may also indicate that the correct NEOSYS monthly licensing fee is not being paid. There is no valid reason for anonymous logins or sharing logins between multiple users.&lt;br /&gt;
&lt;br /&gt;
Therefore if NEOSYS support team get requests for support about using NEOSYS from users who are not registered properly in NEOSYS with an personally identifiable user code, name and email then the following email should be sent cc admin@neosys.com.&lt;br /&gt;
&lt;br /&gt;
No exception should be granted to clients without NEOSYS management approval.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear NEOSYSUSER,&lt;br /&gt;
&lt;br /&gt;
Please note that in order to receive support from NEOSYS you must personally have an identifiable user code, name and email address registered&lt;br /&gt;
in NEOSYS.&lt;br /&gt;
&lt;br /&gt;
We can create new user account for you with your management approval. This may or may not have an impact on the NEOSYS monthly licensing fee &lt;br /&gt;
depending on the agreement in force.&lt;br /&gt;
&lt;br /&gt;
Please let us know what you would like us to do.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
NEOSYS Support&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Handling emails requesting support===&lt;br /&gt;
At times, clients forward old emails, with new issues or do not bother putting the correct subject line for new issues. In such situations, support should fix their email by deleting the irrelevant content and changing the subject and add a comment like &amp;quot;PS Please don&#039;t forward old emails for new issues, either start a new email or delete previous content and put a new subject.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Handling Requests to do Client work ===&lt;br /&gt;
NEOSYS Support staff must not agree or offer to do work on behalf of the client. &lt;br /&gt;
&lt;br /&gt;
This is because doing client work while logged in as NEOSYS breaks security rules. Support uses the NEOSYS username which has unrestricted access, so when a user requests Support to do some work which they don’t have access to, and if Support agrees to do the work, the client has successfully defeated the security rules by accessing features that they are unauthorized to access.&lt;br /&gt;
&lt;br /&gt;
=== Updating Clients about unresolved issues ===&lt;br /&gt;
Support should proactively inform clients if an issue is not solved within the same day it was raised, after judging the urgency of the issue and the time it was raised. An email to the client who raised the issue, before the end of each day, is a best practice that keeps the client updated and other support staff too. This email should be sent regardless of the degree to which the issue has been resolved or if the issue is unresolved. If the issue is unresolved, the email should explain why and also explain the cause of delay.&lt;br /&gt;
&lt;br /&gt;
=== Handling new USER creation ===&lt;br /&gt;
Support staff should create new USERS for clients when requested by authorised person. Clients should not be discouraged to create new users. User statistic is reviewed periodically and clients are billed as per user usage. Over time old USERS are replaced with new USERS. The USER code is the first name of a user.&lt;br /&gt;
&lt;br /&gt;
New user requirements :- &lt;br /&gt;
#Full name&lt;br /&gt;
#Email address&lt;br /&gt;
#Group level / User with similar authorisation.&lt;br /&gt;
&lt;br /&gt;
=== Handling letterhead change requests ===&lt;br /&gt;
&lt;br /&gt;
Support staff should reject any requests that requires the letterhead to be setup on the TESTING dataset before it is setup in the MAIN dataset.This is to reduce double work for support staff and to ensure that clients have a clear understanding of their requirements and also send the correct logo image.&lt;br /&gt;
The MAIN dataset can be copied to the TEST dataset for any kind of testing. &lt;br /&gt;
&lt;br /&gt;
=== Handling error messages ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before Attempting to resolve client issues, please ensure that we have secure access to the NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
#The very first step is understanding client problem.&lt;br /&gt;
#Ask the client what error does he gets on the screen.&lt;br /&gt;
#If error seems to be familiar then resolve it over the phone.&lt;br /&gt;
#If error is unknown then ask user to send a screenshot of the error displayed along with the options used (basically you need to know HOW to replicate the error)&lt;br /&gt;
#Upon receipt of the error, check in all the wikis for a solution.&lt;br /&gt;
#If the issue is unknown or you don’t understand it clearly ask the user then use remote support to gain access to the users desktop to view how to replicate the error. &lt;br /&gt;
&lt;br /&gt;
If it is new issue then report by escalation the same issue to your manager with a brief explanation.&lt;br /&gt;
&lt;br /&gt;
=== Addressing Technical support emails ===&lt;br /&gt;
&lt;br /&gt;
In the case of technical support issues, address emails to the IT person and cc the complete group of recipients of backup emails and other NEOSYS alert emails. This allows both NEOSYS and client IT staff to take credit for resolving issues that NEOSYS raises instead of working in the background unacknowledged.&lt;br /&gt;
&lt;br /&gt;
Technical support issues include backup failure, server failure, missing alert email, server connectivity issues and port forwarding issues and many other issues.&lt;br /&gt;
&lt;br /&gt;
=== Acceptable report format when handling issues in NEOSYS reports ===&lt;br /&gt;
&lt;br /&gt;
NEOSYS Support must only resolve issues in NEOSYS output first. This is because only NEOSYS outputs can be trusted and user versions in Excel or PDF could be copied wrongly or edited by the user.&lt;br /&gt;
&lt;br /&gt;
In case users send reports in excel or other formats, get them to send the original NEOSYS HTML report as an attachment or copy-pasted in email.&lt;br /&gt;
 &lt;br /&gt;
=== Handling issues with totals on reports ===&lt;br /&gt;
&lt;br /&gt;
If a client has a problem with any total output by NEOSYS software then NEOSYS support will advise them which other NEOSYS report or reports provide a complete breakdown of the total (if necessary, to individual transactions) and ask the client to locate any offending transactions themselves.&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff will handle any issues where the total on the breakdown report does not add up to the total on the summary report.&lt;br /&gt;
&lt;br /&gt;
Reconciling totals can be hard if there are many transactions involved. Regardless of how hard it may be, reconciliation is an operational task for users not for support staff since NEOSYS support staff will not get involved in understanding client transactions or data.&lt;br /&gt;
&lt;br /&gt;
==== Trial Balance and Financial Statements ====&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff do not have to prove or trace any figures in NEOSYS Trial Balance Reports or any financial reports. If a figure is stated to be wrong by the user, then NEOSYS support staff should ask for proof or say NEOSYS is confident that the figures are correct unless proved otherwise. &lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff should point out reports in NEOSYS which will support the figures in question but not actually run the reports. Support staff can suggest the users to refer to detailed ledger accounts to prove balances.&lt;br /&gt;
&lt;br /&gt;
==Handling Browser related issues in NEOSYS==&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Technical_/_Hardware_requirements#NEOSYS_Software_Browser_and_OS_Requirements NEOSYS browser requirements]&lt;br /&gt;
&lt;br /&gt;
Clients frequently ask [http://userwiki.neosys.com/index.php/General_FAQ#Why_doesnt_NEOSYS_support_my_XYZ_browser.3F Why NEOSYS doesn&#039;t support other browsers] &lt;br /&gt;
&lt;br /&gt;
To avoid browser errors, all new users must follow the steps given in [http://userwiki.neosys.com/index.php/Using_NEOSYS_Generally#Getting_started_with_NEOSYS Getting started with NEOSYS] before logging in to NEOSYS for the first time.&lt;br /&gt;
&lt;br /&gt;
To troubleshoot browser related errors see [http://userwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Troubleshooting_Web_Browsers Troubleshooting Web Browsers]&lt;br /&gt;
&lt;br /&gt;
Users must clear browser cache after every NEOSYS Upgrade to avoid errors. See [http://techwiki.neosys.com/index.php/Upgrading_NEOSYS#Sample_email_to_be_sent_to_clients_who_face_issues_due_to_failure_in_clearing_browser_cache Sample email to clients who face issues due to failure in clearing browser cache]&lt;br /&gt;
&lt;br /&gt;
Pop-up blockers and any 3rd party toolbars must be deactivated/switched off or else certain pages and alert messages while using NEOSYS do not appear as a result of blocking from either the pop-up blocker or toolbars with built-in pop-up blockers. &lt;br /&gt;
&lt;br /&gt;
NEOSYS support should ask users to Reset browser (See [http://userwiki.neosys.com/index.php/Reset_Browser Reset browser]) if they notice any user browsers which have pop-up blockers or 3rd party toolbars installed.&lt;br /&gt;
&lt;br /&gt;
NEOSYS Support should additionally ensure that under Internet Explorer &amp;gt; Tools &amp;gt; Internet Options &amp;gt; Advanced &amp;gt; Browsing - the items Disable script debugging (Internet Explorer) and Disable script debugging (Other) are &#039;&#039;&#039;UNTICKED&#039;&#039;&#039;. This is because if NEOSYS generates any javascript error message, the same would disappear in the bottom left corner of a window, which in turn helps the programmer fix the error. This must be done after every Factory Reset.&lt;br /&gt;
&lt;br /&gt;
== Handling NEOSYS Upgrade==&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Upgrading_NEOSYS Upgrading NEOSYS]&lt;br /&gt;
&lt;br /&gt;
== Using Support Tools ==&lt;br /&gt;
=== Website Live Support ===&lt;br /&gt;
www.neosys.com is equipped with a Live Support software and clients can visit the website, click on this link and chat with any of our support staff, without the need for any installation. The client has to fill in their name and email address to connect to an available support personnel. During non-working hours, the Live Support icon on the website automatically displays &amp;quot;offline&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
NEOSYS Support personnel who are authorised to provide such support, need to download a software called Kayako Live Support from the link below&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/LiveResponse_3.1.1.122-STABLE.exe&lt;br /&gt;
&lt;br /&gt;
Once downloaded the account needs to be setup as follows:&lt;br /&gt;
&lt;br /&gt;
* Account Name: (as provided by NEOSYS IT)&lt;br /&gt;
* SupportSuite URL: http://support.neosys.com/&lt;br /&gt;
* User Name: (as provided by NEOSYS IT and usually same as Account Name)&lt;br /&gt;
* Password: (as provided by NEOSYS IT)&lt;br /&gt;
&lt;br /&gt;
The first time the account is setup, you need to close Kayako Live Support completely and restart for it to log in and work properly.&lt;br /&gt;
&lt;br /&gt;
=== Teamviewer ===&lt;br /&gt;
Since Teamviewer allows no restriction on access once a fixed pass is installed, Support must not install fixed pass on teamviewer however convenient it might be.&lt;br /&gt;
&lt;br /&gt;
RULE: NO FIXED PASS TO BE INSTALLED ON TEAMVIEWER IN ANY NEOSYS OR NEOSYS CLIENT COMPUTER&lt;br /&gt;
&lt;br /&gt;
Running teamviewer live from a web link is fine because it does not allow installation of a permanent password&lt;br /&gt;
&lt;br /&gt;
For certain tasks that require temporary install of Teamviewer on the client servers (e.g. upgrading Cygwin remotely), use Teamviewer 7 on the server as well as Support staff computer. Contact NEOSYS IT for commercial license of Teamviewer 7. &lt;br /&gt;
&lt;br /&gt;
To support client users who use the latest version of Teamviewer, support staff must also install the latest Teamviewer version available alongside Teamviewer 7.&lt;br /&gt;
&lt;br /&gt;
== Documenting Processes in Wiki ==&lt;br /&gt;
NEOSYS Support staff must be in continual learning mode. This is mandatory for support staff and is not an option. Support must read, learn and understand everything in the support emails and ask questions if they don&#039;t understand. This understanding must be transferred into wiki in the form of new articles and improvements to existing articles.&lt;br /&gt;
&lt;br /&gt;
===Avoiding duplication of text in wiki===&lt;br /&gt;
&lt;br /&gt;
Duplication of text in wiki is to be avoided almost at any cost. Duplication has the problem that when one copy is changed or improved in future then it is highly likely the editor will fail to update the other copy or copies and wiki will over time become an inconsistent mess.&lt;br /&gt;
&lt;br /&gt;
There are several ways to avoid duplication:&lt;br /&gt;
&lt;br /&gt;
#Two or more procedures which have significant areas of duplication can be rewritten as a single procedure with alternatives in the middle of the procedure&lt;br /&gt;
#Wiki Templates- Templates reproduce the same text in all places and editing one place edits all places. See [[How to create templates in wiki]]&lt;br /&gt;
#Wiki links- Only put the text in one place and put links to that in all the other places that it is appropriate.&lt;br /&gt;
#Place a note in all copies something to the effect that &amp;quot;This is similar to x, y and z&amp;quot;. This alerts any future editor of all other places in wiki that might also have to be updated.&lt;br /&gt;
&lt;br /&gt;
Future modifications in one place may or may not be appropriate to other places. The editor must decide whether to change one or all places&lt;br /&gt;
&lt;br /&gt;
=== Cutting and Pasting NEOSYS Maintenance Mode Messages into Wiki ===&lt;br /&gt;
&lt;br /&gt;
Error messages expressed as images are not searchable.&lt;br /&gt;
&lt;br /&gt;
Therefore SELECT THE TEXT OF MAINTENANCE MODE WINDOWS using right click on window heading, Edit, Mark, Copy .. not graphical copy.&lt;br /&gt;
 &lt;br /&gt;
Then paste the text into wiki and surround with &amp;quot;&amp;lt; pre&amp;gt;&amp;quot; and &amp;quot;&amp;lt; /pre&amp;gt;&amp;quot; tags (without the space) as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:loginmessage.jpg]]&lt;br /&gt;
&lt;br /&gt;
the result is searchable text as follows ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔════════════════════════════╗&lt;br /&gt;
║      NEOSYS SECURITY       ║&lt;br /&gt;
║    What is your name ?     ║&lt;br /&gt;
║                            ║&lt;br /&gt;
║   [                    ]   ║&lt;br /&gt;
║                            ║&lt;br /&gt;
║  Please enter your name,   ║&lt;br /&gt;
║   or press Esc to exit.    ║&lt;br /&gt;
╚════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use of personal email addresses by NEOSYS support staff ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff MUST NOT use any personal email addresses for NEOSYS business. &lt;br /&gt;
&lt;br /&gt;
The xxxx.neosys@gmail.com addresses that are created by support staff for themselves on joining are also considered personal email addresses and must not be used for NEOSYS business. These email addresses might be linked to NEOSYS wiki accounts but that doesn&#039;t matter because wiki is not confidential.&lt;br /&gt;
&lt;br /&gt;
== Handling Nagios Client Monitoring system ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS support staff on duty has to follow the below outlined procedures in case of any Nagios items showing a critical or warning message for any service. Failure to schedule appropriate downtime will lead to REDUNDANT ALERTS from NAGIOS every hour.&lt;br /&gt;
 &lt;br /&gt;
# Nagios is required to be checked first thing in the morning and any critical or warning messages need to be dealt with to resolve the same at the earliest. &lt;br /&gt;
# Some of the messages could be related to backup failures and the usual procedure as stated in [[Backup_and_Restore#Handling_failure_and_warning_messages_on_nightly_backup_alerts|Handling failure and warning messages on nightly backup alerts]] needs to be followed. In case the backup issue isn&#039;t resolved by 9:30 am, the Nagios service needs to be scheduled with downtime for a minimum of 2 hours and maximum until 1 am next day if the issue cannot be solved. &lt;br /&gt;
# In case any HTTPS, SSH or PING service is down, immediate action is required and the relevant IT people at the client side needs to be contacted to get this resolved. A downtime of 2 hours is required to be scheduled with further intervals of 2 hours incase this is not resolved. Support staff shouldn&#039;t schedule downtime till 1 am next day, just to get rid of the alerts for the day. Proactive follow up with the client is required to get this resolved before the business day - more so, if there is a weekend ahead. &lt;br /&gt;
# In case the HTTPS, SSH or PING service goes down during the day, a grace period of 20 minutes is given before the issue is reported to the client IT. This helps incase there is any temporary internet connection issue at the client or along the internet route. &lt;br /&gt;
# In case of &amp;quot;Backup not changed&amp;quot; warning status which occurs if the client has not interchanged the USB before 12 noon on that day, no action is required from the support staff and a downtime until 1 am next day needs to be scheduled.&lt;br /&gt;
&lt;br /&gt;
== Handling lack of remote access to NEOSYS server located in client’s premises ==&lt;br /&gt;
&lt;br /&gt;
If access to the NEOSYS server is lost then we must determine the root cause by: &lt;br /&gt;
# Checking if the server is UP and running&lt;br /&gt;
# If yes, please check internet connectivity on the server&lt;br /&gt;
# If there is connectivity, please check the router for connectivity issues&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Response:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
Please note that we have currently lost access to the NEOSYS server. The server seems to be down at the moment and it seems that &lt;br /&gt;
NEOSYS processes are not running on the server.&lt;br /&gt;
Kindly check if the server is UP and running. If yes, please check internet connectivity on the server.&lt;br /&gt;
Do keep us posted on the server status so we can test connectivity from our side as well.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== New Router (Port Forwarding) ==&lt;br /&gt;
&lt;br /&gt;
If you have changed your router then you may notice that external access to NEOSYS is unavailable. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setup a permanent access for NEOSYS by reconfiguring the Router / Firewall for Port Forwarding from Router to the NEOSYS Server as follows: &lt;br /&gt;
# Port 19580 &amp;gt; 19580 for SSH &lt;br /&gt;
# Port 4430 &amp;gt; 4430 for HTTPS&lt;br /&gt;
&lt;br /&gt;
You can see [http://portforward.com/ Set Up Port Forwarding] to learn how to configure your Router.&lt;br /&gt;
&lt;br /&gt;
To see how to test/ troubleshoot port forwarding settings, go to [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting Port Forwarding]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Response:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
You are requested to kindly setup a permanent access for NEOSYS by reconfiguring the Router / Firewall for Port Forwarding from Router to &lt;br /&gt;
the NEOSYS Server,i.e.  port 19580 for SSH and port 4430 for HTTPS.&lt;br /&gt;
&lt;br /&gt;
Once this is complete, kindly send me an email to confirm the same so that we could test connectivity from our end as well.&lt;br /&gt;
&lt;br /&gt;
Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Creating and Handling passwords ==&lt;br /&gt;
Passwords made out of a pass phrase should be at least 10 characters since using initials results in a lot of i&#039;s and a&#039;s etc which reduces the effectiveness of the password and allows hacking via brute force guessing especially since windows doesnt slow down logins even if it sees thousands of password attempts.&lt;br /&gt;
&lt;br /&gt;
=== Creating a password ===&lt;br /&gt;
Passwords are generated from a pass phrase and it is important to create a very difficult to guess pass phrase.&lt;br /&gt;
&lt;br /&gt;
For example, a good pass phrase would be: &#039;&#039;&#039;Today is a good day and it is the best time to go for a holiday&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The password for this would be &#039;&#039;&#039;Tiagdaiitbt2g4ah&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The important instructions for the above are:&lt;br /&gt;
#You have to take the first letter of each word and that makes your password (i.e. by using initials)&lt;br /&gt;
#Wherever any word starts with a capital, then you have to take first letter as a capital (eg. For Today you will take T)&lt;br /&gt;
#Replace &#039;&#039;&#039;and&#039;&#039;&#039; with &#039;&#039;&#039;&amp;amp;&#039;&#039;&#039;&lt;br /&gt;
#Replace &#039;&#039;&#039;to&#039;&#039;&#039; with &#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
#Replace &#039;&#039;&#039;for&#039;&#039;&#039; with &#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Handling passwords ===&lt;br /&gt;
#Never send the actual password - always send the pass phrase&lt;br /&gt;
#Make sure that the password created out of the pass phrase is at least 10 characters long since using initials results in a lot of i&#039;s and a&#039;s etc which reduces the effectiveness of the password and allows hacking via brute force guessing especially since windows doesnt slow down logins even if it sees thousands of password attempts&lt;br /&gt;
#Pass phrases are never to be sent by email, whatever the case maybe.&lt;br /&gt;
#Pass phrases can be sent by chat - however they have to be broken down in two parts and sent separately over two different messengers or if you are using Gtalk then use the &#039;off the record&#039; mode.&lt;br /&gt;
#Using SMS to send pass phrases is the best known way as of now.&lt;br /&gt;
#If you save the passwords on your system in an file then:&lt;br /&gt;
#*Ensure that you only store pass phrases in the excel file&lt;br /&gt;
#*Ensure that the excel file is encrypted with a master password&lt;br /&gt;
&lt;br /&gt;
== NEOSYS Maintenance Window ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS server is functional from 6am – 1am. There is a 5hr window gap for the system to perform updates &amp;amp; backups.&lt;br /&gt;
&lt;br /&gt;
The 5hr maintenance window:-&lt;br /&gt;
&lt;br /&gt;
1. At 1am – The server performs a data backup on a USB (for the respective clients) &amp;amp; once the backup has been completed, the system automatically generates an email addressed to the neosys staff &amp;amp; the respective clients.&lt;br /&gt;
&lt;br /&gt;
2. At 2:45am – The main data over writes the test data on the server.&lt;br /&gt;
&lt;br /&gt;
3. At 3:00am – The server by itself performs an update for Windows.&lt;br /&gt;
&lt;br /&gt;
4. At 4:00am – The server performs a backup to the headquarters for clients, and then automatically generates an email addressed to the NEOSYS staff &amp;amp; the respective clients.&lt;br /&gt;
&lt;br /&gt;
5. At 6:00am – The server starts up NEOSYS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Amending/Reposting Journal Entries ==&lt;br /&gt;
In certain exceptional cases, amending/reposting of journal entries is allowed for a brief period of time to enable clients to present reports in an alternative manner. This would be subject to NEOSYS would requiring a written LETTER OF APPROVAL duly signed and stamped by the highest management of the company.&lt;br /&gt;
&lt;br /&gt;
In case the client management decides to allow editing/reposting of journal entries, the following procedure is to be followed:&lt;br /&gt;
# Client must de-allocate vouchers which need to be amended&lt;br /&gt;
# NEOSYS support staff must wait for a day so that de-allocated vouchers are copied into Test database&lt;br /&gt;
# Authorise required users to amend and repost (without record) &#039;&#039;&#039;in Test database only&#039;&#039;&#039; &amp;lt;br&amp;gt;( While reposting, we have 2 options i.e. with record and without record. The &#039;with record&#039; option causes the system to maintain a history of edits made. Hence, we want to repost without record so that there is no trace of the edit in the system)&lt;br /&gt;
# Amend a substantial number of vouchers in Test and verify them.&amp;lt;br&amp;gt;To verify if the edits made are reflected:&lt;br /&gt;
# *Print all ledgers for the whole year&lt;br /&gt;
# *Cross-check all balances&lt;br /&gt;
# Once you verify the balances are correct in Test database, grant users permission to amend and repost in the Live database.&lt;br /&gt;
# Ask users to amend and repost vouchers in the Live database.&lt;br /&gt;
# Cross-check all balances for the current year.&lt;br /&gt;
# If you successfully verify the balances, revoke permissions immediately. Else, wait for 24 hours and revoke permissions irrespectively.&lt;br /&gt;
&lt;br /&gt;
== Removal of unauthorized third-party software on client servers ==&lt;br /&gt;
&lt;br /&gt;
Rule: Any third party software that is discovered by NEOSYS support staff on client servers that has been installed without the agreement of NEOSYS should be uninstalled immediately on discovery.&lt;br /&gt;
&lt;br /&gt;
However purposeful a software is, NEOSYS is contractually responsible for support and there are too many opportunities for poorly installed software to cause unpredictable damage to the NEOSYS database so NEOSYS has to have a clear and safe and simple policy to ensure the integrity of client data. Installing software without prior discussion with NEOSYS by itself indicates that insufficient care and consideration as been given to possible issues.&lt;br /&gt;
&lt;br /&gt;
Any software required by client IT for some purpose may only be installed after discussion and agreement from NEOSYS support staff concerning the configuration and operation of the software.&lt;br /&gt;
&lt;br /&gt;
The NEOSYS Software Licence and Support agreement requires that where NEOSYS software is installed on client servers that a dedicated server is provided and dedicated implies that no other software may be installed without the agreement of NEOSYS support.&lt;br /&gt;
&lt;br /&gt;
== Configuring tunnelier to autologin on opening tlp files ==&lt;br /&gt;
If you have many tunnelier tlp files in a directory and connect by opening the desired tlp file the, instead of opening the file and then clicking Login you can also right click the file and select Connect.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can configure tunnelier to login (connect) automatically by following the procedure mentioned below. (Even if you configure automatic login, you can still open and not login by right clicking and choosing Open)&lt;br /&gt;
&lt;br /&gt;
=== Windows 8 ===&lt;br /&gt;
&lt;br /&gt;
Cannot be done using standard Windows UI. Some download utilities can do it. TODO put a safe one in neosys.com/support&lt;br /&gt;
&lt;br /&gt;
=== Windows XP/Vista/7/2008 ===&lt;br /&gt;
&lt;br /&gt;
#Go to My Computer&lt;br /&gt;
#Click on Tools -&amp;gt; Folder Options &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tunnauto-1.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click on File Types&lt;br /&gt;
#*Select TLP (Bitvise Tunnelier Profile) [Type &amp;quot;TLP&amp;quot; to find it quickly]&lt;br /&gt;
#*Click on Advanced &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tunnauto-2.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Connect and Click on Set Default &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[image:tunnauto-3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[ New Employee Training Checklist]]==&lt;br /&gt;
&lt;br /&gt;
==[[ New Client Training Notes]]==&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1790</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1790"/>
		<updated>2014-11-06T07:16:26Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin remotely */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrading cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Suggested method to maintain connectivity during cygwin upgrade&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
After the upgrade, REMOVE SETTINGS for unattended access and UNINSTALL Teamviewer. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 7 which does not give this error. Contact NEOSYS IT for TeamViewer7 commercial license. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created or upgraded as follows:&lt;br /&gt;
&lt;br /&gt;
It is recommended that you inspect the version of the pre-installed script against the http version and upgrade to the latest.&lt;br /&gt;
&lt;br /&gt;
First find the text of the script at http://www.neosys.com/support/upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Then, assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F How to check Cygwin version]&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
TODO: To be revised&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=User_talk:Ruku&amp;diff=1780</id>
		<title>User talk:Ruku</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=User_talk:Ruku&amp;diff=1780"/>
		<updated>2014-10-22T11:17:22Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Welcome!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to &#039;&#039;NEOSYS Technical Support Wiki&#039;&#039;!&#039;&#039;&#039;&lt;br /&gt;
We hope you will contribute much and well.&lt;br /&gt;
You will probably want to read the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents help pages].&lt;br /&gt;
Again, welcome and have fun! [[User:Nikhil|Nikhil]] ([[User talk:Nikhil|talk]]) 15:17, 22 October 2014 (GST)&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=User:Ruku&amp;diff=1779</id>
		<title>User:Ruku</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=User:Ruku&amp;diff=1779"/>
		<updated>2014-10-22T11:17:22Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Creating user page for new user.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE MAINTENANCE&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=New_Employee_Training_Checklist&amp;diff=1774</id>
		<title>New Employee Training Checklist</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=New_Employee_Training_Checklist&amp;diff=1774"/>
		<updated>2014-10-22T05:31:16Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Day 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Day 1==&lt;br /&gt;
#Create email Id  eg :- firstname.neosys@gmail.com &lt;br /&gt;
#Create Skype ID  eg:- firstname.neosys&lt;br /&gt;
#Download Dropbox and create an account in Dropbox using the gmail account&lt;br /&gt;
#Create thunderbird  inbox’s   support@neosys.com, backup@neosys.com, nagios@neosys.com&lt;br /&gt;
#Create signature in thunderbird&lt;br /&gt;
#Create password for the computer/laptop&lt;br /&gt;
#Mails are sent out in Calibri font with font size 11&lt;br /&gt;
#Password file:- This file contains all usernames and passwords.  File name should be generic. The file is password protected, please refer link to create appropriate password for the file (http://techwiki.neosys.com/index.php/Procedures#Creating_and_Handling_passwords) .File should be placed under nested folders. The aim is to protect the file from being &lt;br /&gt;
#Create file to store client info ( clients details) column names:- host name, company name , location of company, time zone, which server is the NEOSYS hosted&lt;br /&gt;
#Make vm1.neosys.com as Firefox home page&lt;br /&gt;
#Go through Procedures in wiki&lt;br /&gt;
#Introduce nagios &lt;br /&gt;
#Read wiki page “Backup and Restore” &lt;br /&gt;
#Support suit login ID , wiki ID &lt;br /&gt;
#http://network-tools.com&lt;br /&gt;
&lt;br /&gt;
==Day 2 ==&lt;br /&gt;
#Check the clients file&lt;br /&gt;
#Explain backup procedure&lt;br /&gt;
#Show backup emails&lt;br /&gt;
#Share backup files &lt;br /&gt;
#Make the candidate do the morning backup-check routine.&lt;br /&gt;
#Explain http://techwiki.neosys.com/index.php/Procedures#NEOSYS_Maintenance_Window&lt;br /&gt;
#Explain different backup failures&lt;br /&gt;
#Various checks on why and how a backup failed. ( mail in inbox, nagios trends, neosys log, server event viewer)&lt;br /&gt;
#Share canned file &lt;br /&gt;
#NEOSYS login page and configuring NEOSYS&lt;br /&gt;
==Day 3==&lt;br /&gt;
#Go through Canned mails.&lt;br /&gt;
#Show examples on when each canned mails can be sent&lt;br /&gt;
#Do backups for the day. Mark backup in backup file.  &lt;br /&gt;
#Schedule downtime on nagios&lt;br /&gt;
#Various errors in Troubleshooting nagios to be looked at http://techwiki.neosys.com/index.php/Handling_Nagios_Client_Monitoring_System &lt;br /&gt;
&lt;br /&gt;
==Day 4==&lt;br /&gt;
#Handle backup issues, critical issues on nagios&lt;br /&gt;
#Email clients if they need to be informed about issues.&lt;br /&gt;
#Explain Getting Started and NEOSYS login process&lt;br /&gt;
#Explain Media Schedule (per brand, Client Brand file, Vehicle file, specification, material, dates, free ads,  Supplier file, booking, certifying, invoicing) &lt;br /&gt;
==Day 5==&lt;br /&gt;
#2 Assignments on Schedules ( booking, cancelation, rebooking, certify &amp;amp; invoicing )&lt;br /&gt;
#Creating on various client and brand , vehicle and supplier files&lt;br /&gt;
#Practice Media module&lt;br /&gt;
==Day 6==&lt;br /&gt;
#Handling damaged file with examples&lt;br /&gt;
#Quiz on Procedures, Nagios and Handling damaged files&lt;br /&gt;
==Day 7==&lt;br /&gt;
#Jobs Module completely and practice&lt;br /&gt;
#Explain Authorisation file (locks and keys, user ID , various levels etc)&lt;br /&gt;
==Day 8==&lt;br /&gt;
#How to Upgrade NEOSYS &lt;br /&gt;
#Upgrade a client&lt;br /&gt;
#Tested on TEST installation.&lt;br /&gt;
#Explain Zone edit, DNS&lt;br /&gt;
==Day 9==&lt;br /&gt;
#Free ads in Media schedule , how to replicate issues of clients&lt;br /&gt;
#Backup and Restoring NEOSYS&lt;br /&gt;
#Moving NEOSYS to new server/location etc&lt;br /&gt;
#Consolidated Backup ( Autologin.sh)&lt;br /&gt;
#System configuration file features and testing each field&lt;br /&gt;
&lt;br /&gt;
==Day 10==&lt;br /&gt;
#Request for a quick demo from the new staff&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=1772</id>
		<title>Setting up HTTPS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=1772"/>
		<updated>2014-10-21T12:21:19Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Re-installing Certificates from selfssl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Creating a single HTTPS web site on Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
Install selfssl.exe from Microsoft site (iis60rkt.exe available in neosys nl1 download folder) only the SSL utility is needed. This utility is already installed and available on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;displaylang=en&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-1.jpg]]&lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\IIS Resources\SelfSSL&amp;gt;selfssl.exe /N:CN=NEOSYS-SERVER /K:1024 /V:9999 /S:8 /P:4430 &lt;br /&gt;
 Microsoft (R) SelfSSL Version 1.0&lt;br /&gt;
 Copyright (C) 2003 Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
 Do you want to replace the SSL settings for site 1 (Y/N)?y&lt;br /&gt;
 Error opening metabase: 0x80040154&lt;br /&gt;
 C:\Program Files\IIS Resources\SelfSSL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*/n:CN=&#039;&#039;&#039;hostname&#039;&#039;&#039; indicates the full domain name of the site and depends on what you want to use (eg. clientname.hosts.neosys.com if the site is hosted on nl1/nl1b or clientname.support.neosys.com (if fixed IP) / clientname.redirectme.net (if dynamic IP) IF the site is hosted on the client server.&lt;br /&gt;
*/K:Key size. Use default 1024&lt;br /&gt;
*/V:9999 means valid for 9999 days&lt;br /&gt;
*/S:8 is the site number in this case (site number is shown in IIS management screen)&lt;br /&gt;
*/P:4430 is the non-standard port number NEOSYS uses by convention for SSL/HTTPS instead of the standard 443. 4430 can be replaced with custom port numbers in case the installation is on a NEOSYS server. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_site_in_IIS Creating a site in IIS on NEOSYS hosted server]&lt;br /&gt;
 &lt;br /&gt;
Ignore the &#039;&#039;&#039;Error opening metabase: 0x80040154&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next go to the IIS Manager and make sure the certificate was created and stored. Creating a certificate does not make it automatically bind to the website. &lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once you make sure it is created, then click on Sites &amp;gt; Default Website and in the right pane select Bindings:&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-3.jpg]]&lt;br /&gt;
&lt;br /&gt;
In the Bindings section - click on Add and select https, All Unassigned IP addresses, port 4430 and select the certificate from the drop down and press click on OK:&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-4.jpg]]&lt;br /&gt;
&lt;br /&gt;
Then test the site from explorer to make sure it works.&lt;br /&gt;
&lt;br /&gt;
== Creating a single HTTPS web site on Windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
Install selfssl.exe from Microsoft site (iis60rkt.exe available in neosys nl1 download folder) only the ssl utility is needed.&lt;br /&gt;
&lt;br /&gt;
http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;displaylang=en&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
[[Image:SelfSSL.png]]&lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\IIS Resources\SelfSSL&amp;gt;selfssl /v:9999 /s:&#039;&#039;&#039;&#039;&#039;866651215&#039;&#039;&#039;&#039;&#039; /p:4430 /n:CN=&#039;&#039;&#039;&#039;&#039;hostname&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
 Microsoft (R) SelfSSL Version 1.0&lt;br /&gt;
 Copyright (C) 2003 Microsoft Corporation. All rights reserved.&lt;br /&gt;
 Do you want to replace the SSL settings for site 866651215 (Y/N)?y&lt;br /&gt;
 The self signed certificate was successfully assigned to site 866651215.&lt;br /&gt;
&lt;br /&gt;
 /v:9999 means valid for 9999 days&lt;br /&gt;
 /s:&#039;&#039;&#039;&#039;&#039;866651215&#039;&#039;&#039;&#039;&#039; is the site number in this case   (site number is shown in IIS management screen)&lt;br /&gt;
 /p:4430 is the non-standard port number neosys uses by convention for ssl/https instead of the standard 443&lt;br /&gt;
 /n:CN=&#039;&#039;&#039;&#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; indicates the full domain name of the site and depends on what you want to use (eg. clientname.hosts.neosys.com if the site &lt;br /&gt;
  is hosted on nl1/nl1b or clientname.support.neosys.com (if fixed IP) / clientname.redirectme.net (if dynamic IP) IF the site is &lt;br /&gt;
  hosted on the client server.&lt;br /&gt;
&lt;br /&gt;
You probably made a mistake in the site number if you get the following message.&lt;br /&gt;
&lt;br /&gt;
 Error opening site metabase key: 0x80070003&lt;br /&gt;
&lt;br /&gt;
== Creating multiple HTTPS web sites on NEOSYS hosted server ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a site in IIS ===&lt;br /&gt;
&lt;br /&gt;
All clients hosted on NEOSYS servers use the same IP address, but different unique HTTPS port numbers starting from 4431 onwards. Similarly HTTP ports are configured with unique port numbers starting from 8123 onwards. The unique port number should be one greater than the highest port number available on the server under IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites.  &lt;br /&gt;
&lt;br /&gt;
==== Creating a site in IIS in Windows 2008 ====&lt;br /&gt;
&lt;br /&gt;
A port binding for HTTP is already created while configuring IIS.&lt;br /&gt;
&lt;br /&gt;
Follow the procedures as explained in [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008 Creating a Site in Win 2008] and add a port binding for HTTPS.&lt;br /&gt;
&lt;br /&gt;
==== Creating a site in IIS in Windows 2003 ====&lt;br /&gt;
&lt;br /&gt;
The https options are only available after running selfssl (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:httpadvancedwebsitesetup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Testing access to the new HTTPS web site. ===&lt;br /&gt;
&lt;br /&gt;
Make a subdomain &#039;&#039;&#039;clientname&#039;&#039;&#039;.hosts.neosys.com&lt;br /&gt;
&lt;br /&gt;
Open &amp;quot;https://&#039;&#039;&#039;clientname&#039;&#039;&#039;.hosts.neosys.com:44XX/neosys&amp;quot; in IE where 44XX is the designated port number&lt;br /&gt;
&lt;br /&gt;
If you get certificate error:&lt;br /&gt;
&lt;br /&gt;
#check that the selfsll /n:CN=&#039;&#039;&#039;clientname&#039;&#039;&#039;.hosts.neosys.com matches the domain name used in IE&lt;br /&gt;
#install the certificate into the client computer (double click the padlock, view certificates etc)&lt;br /&gt;
&lt;br /&gt;
Closing all internet explorer versions and restarting is necessary for installed certificates to become effective.&lt;br /&gt;
===Export, Remove and Import Certificates ===&lt;br /&gt;
&lt;br /&gt;
This step applies to both Windows 2003 and Windows 2008.&lt;br /&gt;
&lt;br /&gt;
The EXPORT/REMOVE/IMPORT stage is necessary where there are multiple https sites on one server since any subsequent SELFCERT seems to destroy all other sites done with SELFCERT that have not been exported/REMOVED/imported. &lt;br /&gt;
&lt;br /&gt;
Exporting and Importing certificates in Windows 2008 is just one part of the step to add certificates to sites and you need to follow the usual instructions to &amp;quot;bind&amp;quot; the certificate to a particular site.&lt;br /&gt;
&lt;br /&gt;
Certificates must be saved in d:\hosts\certificates preferably by name for easy reference otherwise by site number. If this is not done then if certificates need to be regenerated then you have the pain of supporting re-import of certificates by all users. &lt;br /&gt;
&lt;br /&gt;
#Export the certificate to a pfx file from IIS Manager &amp;gt; Click on Certificate &amp;gt; Export (to d:\hosts\certificates  - password to be set is in a text file in the same folder)&lt;br /&gt;
#Remove the certificate from IIS Manager&lt;br /&gt;
#Import pfx certificate back from IIS Manager&lt;br /&gt;
#*Use PASSWORD found in certificates folder&lt;br /&gt;
#*Make sure you select the &amp;quot;mark certificate as exportable&amp;quot; option &amp;lt;br&amp;gt;[[image:import-export.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up HTTPS for installations with more than 1 database==&lt;br /&gt;
&lt;br /&gt;
In cases where there are multiple databases within the same installation, the website can be made accessible via different URLs, one for each database, like database1.hosts.neosys.com and database2.hosts.neosys.com, though they will finally be pointing to the same website. In order to assign multiple URLs to the same website, simply repeat the steps for Creating a Single website in [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2003 Windows 2003] or [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008 Windows 2008] for each HTTPS URL that is required.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting setup of multiple HTTPS websites ==&lt;br /&gt;
&lt;br /&gt;
SelfSSL allows only one website to have SSL at a time in Windows 2003. However to avoid any issues in the future the solutions below have been provided for both Windows 2003 and 2008.&lt;br /&gt;
&lt;br /&gt;
=== Re-installing Certificates ===&lt;br /&gt;
&lt;br /&gt;
Sometimes due to an unknown issue, site/s stop working and hence there is a need to re-install the site certificate.&lt;br /&gt;
&lt;br /&gt;
===== Re-installing Certificates from saved PFX files =====&lt;br /&gt;
&lt;br /&gt;
#Unbind the certificate from the site&lt;br /&gt;
#Remove the certificate from IIS Manager&lt;br /&gt;
#Import pfx certificate back from IIS Manager&lt;br /&gt;
#*Use PASSWORD found in certificates folder&lt;br /&gt;
#*Make sure you select the &amp;quot;mark certificate as exportable&amp;quot; option &amp;lt;br&amp;gt;[[image:import-export.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Rebind the certificate&lt;br /&gt;
&lt;br /&gt;
===== Re-installing Certificates from selfssl =====&lt;br /&gt;
&lt;br /&gt;
In case there is no saved PFX file available to import(probably because the export/remove/import certificate step was not done during installation), then a new certificate must be created using selfSSL. &lt;br /&gt;
&lt;br /&gt;
If users have installed certificates in their browsers then they will have to reinstall them again to avoid the usual &amp;quot;certificate not trusted/matching&amp;quot; type problems.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Steps&#039;&#039;&#039;&lt;br /&gt;
#Unbind the certificate from the site&lt;br /&gt;
#Remove the certificate from IIS Manager&lt;br /&gt;
#Create a new certificate as shown in [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008 Creating a single HTTPS website in Windows 2008]&lt;br /&gt;
#Bind the new certificate to the website&lt;br /&gt;
#Do the export/remove/import step to have a working PFX file and avoid problems in the future. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Export.2C_Remove_and_Import_Certificates Export,Remove and Import]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Handling_Nagios_Client_Monitoring_System&amp;diff=1770</id>
		<title>Handling Nagios Client Monitoring System</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Handling_Nagios_Client_Monitoring_System&amp;diff=1770"/>
		<updated>2014-10-21T12:04:45Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Backup -&amp;gt; Impossible alert */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Procedure to handle Nagios =&lt;br /&gt;
&lt;br /&gt;
The procedure that support staff need to follow while handling Nagios is documented [[Procedures#Handling_Nagios_Client_Monitoring_system|here]]&lt;br /&gt;
&lt;br /&gt;
Nagios is accessed via this link: http://monitor.neosys.com/nagios3&lt;br /&gt;
&lt;br /&gt;
= Nagios services =&lt;br /&gt;
&lt;br /&gt;
Nagios is configured to display information pertaining to all NEOSYS client&#039;s server statuses which include multiple services such as:&lt;br /&gt;
# HTTPS: Most of NEOSYS clients are configured to have external web access via secure HTTP protocol (port 4430) from outside office. Nagios is configured to check port 4430 on a regular interval of 10 minutes and display any issues in accessing the same.&lt;br /&gt;
# SSH: As part of the support contract, NEOSYS should have external secure access to the client server usually over port 19580. Nagios is configured to check this port on a regular interval of 10 minutes and display any issues in accessing the same.&lt;br /&gt;
# Ping: Nagios is also configured to ping the client router as a measure to check if router responds incase the NEOSYS server is down.&lt;br /&gt;
# NEOSYS: This service works in a reverse direction, and the NEOSYS installation on the client server sends information such as databases running, current backup status, internal and internet IP addressess etc to Nagios on a regular interval of 10 minutes.&lt;br /&gt;
&lt;br /&gt;
Some key information about Nagios is as follows:&lt;br /&gt;
* Nagios is also configured to display information related to internal servers. &lt;br /&gt;
* Clients hosted on a NEOSYS cloud server might not have services such as SSH or PING as this is monitored as part of the internal server service.&lt;br /&gt;
* Nagios sends out email alerts to support2@neosys.com (which is forwarded to support@neosys.com) from 8 am to 12 midnight on all Dubai working days (Sun-Thu). No alerts are sent out on Fri and Sat, unless they are for NEOSYS internal servers.&lt;br /&gt;
&lt;br /&gt;
= How to handle a service error =&lt;br /&gt;
# Nagios Service Info - get there via various routes eg from Service Problems - then click on the service name (not the host name)&lt;br /&gt;
# Service Commands, Acknowledge this service problem (only services with status Warning or Critical have this option)&lt;br /&gt;
# Enter a note - explaining to yourself and your co-workers explaining how the problem is being handled and when to follow up&lt;br /&gt;
&lt;br /&gt;
Notifications will be automatically resumed once the service becomes OK again.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Disable notifications&amp;quot; is not quite the same and shows as red on tactical summary screen.&lt;br /&gt;
&lt;br /&gt;
===[[Backup_and_Restore#Updating_Nagios_incase_of_failures| Updating Nagios in case of backup failures]]===&lt;br /&gt;
&lt;br /&gt;
=== How to stop ALL notifications ===&lt;br /&gt;
&lt;br /&gt;
Useful to stop a massive number of alerts due to various causes.&lt;br /&gt;
&lt;br /&gt;
#Nagios Process Info&lt;br /&gt;
#Enable/Disable notifications&lt;br /&gt;
&lt;br /&gt;
=== Speeding up Nagios web interface ===&lt;br /&gt;
&lt;br /&gt;
The usual F5 to refresh before the automatic 90 second refresh works but Ctrl+F5 doesnt.&lt;br /&gt;
&lt;br /&gt;
=== Speeding up NEOSYS process checkins ===&lt;br /&gt;
&lt;br /&gt;
You can force a neosys service checkin from NEOSYS maintenance mode (any process/database) press F5&lt;br /&gt;
&lt;br /&gt;
 MONITOR2&lt;br /&gt;
&lt;br /&gt;
=== Adding the client to Nagios ===&lt;br /&gt;
This can be done by IT personnel of NEOSYS and needs to be escalated to them.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting NAGIOS generally =&lt;br /&gt;
==Resolving “CRITICAL – Socket timeout after 10 secs” error message on NAGIOS==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
[[image:Vm3nagios.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
&lt;br /&gt;
NAGIOS is not updating services like CPU Load, Drive Space C:, Drive Save D:,Explorer, Memory Usage etc.&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Open Windows Task Manager and kill any nscp.exe process. Then, restart NSClient++ from the desktop or by going to Start&amp;gt; Programs&amp;gt; NSClient++&lt;br /&gt;
&lt;br /&gt;
== Resolving “NEOSYS has not checked in” error message==&lt;br /&gt;
&lt;br /&gt;
=== Error Message Explained ===&lt;br /&gt;
You notice a problem on NAGIOS indicating that &#039;&#039;&#039;&#039;&#039;NEOSYS not checked in&#039;&#039;&#039; on a particular client server. This happens because NEOSYS is not updating NAGIOS.&lt;br /&gt;
&lt;br /&gt;
=== Possible Causes &amp;amp; Solutions ===&lt;br /&gt;
#The maintenance window is left open. Make sure the maintenance window has not been left open in the server.&lt;br /&gt;
#Hung process on server. e.g.:- Fatal Error in Rev Restart. Follow steps in troubleshooting [[Troubleshooting_NEOSYS_Generally#Troubleshooting_Hung_processes| hung process]]. &lt;br /&gt;
====The NEOSYS process is &#039;&#039;&#039;NOT&#039;&#039;&#039; running on the server====&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS process and wait for 10 mins for NEOSYS to check into NAGIOS.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The NEOSYS process &#039;&#039;&#039;is&#039;&#039;&#039; running on the server but still cannot connect to NAGIOS====&lt;br /&gt;
&lt;br /&gt;
NEOSYS connects to NAGIOS using http. NEOSYS automatically detects and uses any http proxy configuration configured in Internet Explorer. If the Internet Explorer in the server can reach the internet then NEOSYS should be able to update to NAGIOS via the same proxy.&lt;br /&gt;
&lt;br /&gt;
First check if Internet Explorer in the server can reach NAGIOS. Type the following link into the Internet Explorer in the server:&lt;br /&gt;
&lt;br /&gt;
 http://monitor.neosys.com&lt;br /&gt;
&lt;br /&gt;
If you are asked to login then the Internet Explorer is working OK. You do not need to login. Just cancel and move on to the next step.&lt;br /&gt;
&lt;br /&gt;
If Internet Explorer CANNOT connect to NAGIOS then resolving that fundamental issue will probably solve the NAGIOS connection issue too.&lt;br /&gt;
&lt;br /&gt;
View the Internet Explorer proxy configuration as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:ieproxy.png]]&lt;br /&gt;
&lt;br /&gt;
If Internet Explorer CAN connect to NAGIOS then check if there is an issue with NEOSYS&#039;s http proxy server configuration as follows:&lt;br /&gt;
&lt;br /&gt;
#Search for &#039;&#039;&#039;UPDATE.$WG&#039;&#039;&#039; file located in the neosys\neosys. folder and open it using notepad or wordpad.&lt;br /&gt;
#You should find a message similar to the following:   &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connecting to 192.168.100.145:8080 failed: No such file or directory.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where the above appears to be some non-functional http proxy server ip/port number and is not the expected nagios server ip number.&lt;br /&gt;
&#039;&#039;&#039;A windows proxy command shows the same ip and port:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On Windows 2003/XP&lt;br /&gt;
&lt;br /&gt;
 proxycfg&lt;br /&gt;
&lt;br /&gt;
On Windows 2008/Win7&lt;br /&gt;
&lt;br /&gt;
 NetSH WinHTTP import Proxy ie&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft (R) WinHTTP Default Proxy Configuration Tool&lt;br /&gt;
Copyright (c) Microsoft Corporation. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Current WinHTTP proxy settings under:&lt;br /&gt;
  HKEY_LOCAL_MACHINE\&lt;br /&gt;
    SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\&lt;br /&gt;
      WinHttpSettings :&lt;br /&gt;
&lt;br /&gt;
    Proxy Server(s) :  192.168.100.145:8080&lt;br /&gt;
    Bypass List     :  192.168.*.*;localhost;&amp;lt;local&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution 1 - Remove the above setting to create a direct connection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#To remove the registry entries that ProxyCfg.exe creates,you must delete the WinHttpSettings value from the following registry key:&amp;lt;br&amp;gt;&amp;lt;PRE&amp;gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\WinHttpSettings&amp;lt;/PRE&amp;gt;&lt;br /&gt;
#After you do the above, confirm that the proxy details are deleted by running the proxycfg command &amp;lt;BR&amp;gt;&lt;br /&gt;
#Next, restart the NEOSYS processes for the changes to be affected&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution 2 - Configure a functioning proxy ip/port number&#039;&#039;&#039;&lt;br /&gt;
#Use the proxycfg command to enter a working proxy ip/port number/exclusion list: http://msdn.microsoft.com/en-us/library/aa384069%28VS.85%29.aspx&lt;br /&gt;
#After you do the above, confirm that the new proxy details are working by running the proxycfg command again&lt;br /&gt;
#Next, restart the NEOSYS processes for the changes to be affected&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt; Note: Please refer to the link before you restart NEOSYS processes [[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services]] &amp;lt;/B&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the client server, look at the text of UPDATE.$WG and other UPDATE.* files in the client&#039;s NEOSYS installation neosys/neosys folder for clues.&lt;br /&gt;
&lt;br /&gt;
==== There is a problem with the USB media inserted for backup====&lt;br /&gt;
Refer [[Troubleshooting_NEOSYS_Generally#Error_message:_.E2.80.9CAbort.2C_Retry.2C_Fail.E2.80.9D|here]]&lt;br /&gt;
&lt;br /&gt;
==== NEOSYS thinks it sees a new neosys2.exe upgrade file on the location http://www.neosys.com/support/neosys2.exe and attempts to download it ====&lt;br /&gt;
&lt;br /&gt;
Refer [[Troubleshooting_NEOSYS_Generally#NEOSYS_process_window_displays_message_.22Upgrade_Downloading.22 | here]]&lt;br /&gt;
&lt;br /&gt;
== Resolving &amp;quot;Cannot make SSL connection&amp;quot;==&lt;br /&gt;
===Error Message===&lt;br /&gt;
[[File:SSL.jpg]]&lt;br /&gt;
&lt;br /&gt;
Users get the message &amp;quot;This page cannot be displayed&amp;quot; when they try to access the HTTPS website.&lt;br /&gt;
TODO Add screenshot&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
When there are multiple HTTPS sites on one server, any subsequent SSL self certifications seems to destroy all other sites with self certification where the export/REMOVE/import step is not done for some reason. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Export.2C_Remove_and_Import_Certificates Export, Remove and Import Step]&lt;br /&gt;
&lt;br /&gt;
This issue is only evident after the server restart.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Re-install certificates. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Re-installing_Certificates Re-installing Certificates]&lt;br /&gt;
&lt;br /&gt;
== Backup -&amp;gt; Impossible alert ==&lt;br /&gt;
===Possible Causes and Solutions===&lt;br /&gt;
If there is an error &amp;quot;Backup-&amp;gt;Impossible&amp;quot; on Nagios check if the USB is properly inserted and schedule downtime to Nagios for 2 hours.&lt;br /&gt;
&lt;br /&gt;
==[[Backup_and_Restore#Interchange_backup_USB_mail_reminder| &amp;quot;Change Backup&amp;quot; alert]]  ==&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Network Outages reflected in Nagios due to reassigning of router name or IP address ==&lt;br /&gt;
Nagios displays errors if a router name or the ip address it is monitoring have been reassigned. &lt;br /&gt;
&lt;br /&gt;
We can resolve this issue by trying to find the ISP router ip address just before the NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
Steps:-&lt;br /&gt;
#Login to Nagios&lt;br /&gt;
#Click on Tactical Overview -&amp;gt; Network Outages and click on Blocking Outages to view &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-00.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#You will now see the host/ISP which is down. Click on the status map icon to identify the host associated with the ISP, as shown below: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-01.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#From the Network Map displayed, identify the host associated with the ISP. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-02.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#If you already know the ip address of the host then skip to next step else, in Nagios, click on Host Detail, then on the hostname identified earlier and From the Host Details shown, save the host url. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-03.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-04.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Log onto www.network-tools.com:&lt;br /&gt;
#*Select Trace&lt;br /&gt;
#*Enter the host&#039;s ip address if already known or host url&lt;br /&gt;
#*Click on Go &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-05.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#The trace route should complete successfully revealing the IP address of the ISP just before the NEOSYS server. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-06.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#You can now login to zoneedit and update the ip address of the host.&lt;br /&gt;
#Check Nagios.&lt;br /&gt;
== Nagios reports a hung process ==&lt;br /&gt;
===Possible Causes and Solutions===&lt;br /&gt;
Refer link [[Troubleshooting_NEOSYS_Generally#Error_message:_.22Read_error_in_the_operating_system_file.22|here]]&lt;br /&gt;
&lt;br /&gt;
==Explorer.exe not running ==&lt;br /&gt;
Nagios will display this error for only nl1 at the moment. &lt;br /&gt;
&lt;br /&gt;
===Possible Causes and Solutions===&lt;br /&gt;
This error means that the server has (for whatever reasons) rebooted and stuck at the Windows login prompt for someone to enter the username &amp;amp; password. (More info on explorer.exe is available at http://en.wikipedia.org/wiki/Explorer.exe)&lt;br /&gt;
&lt;br /&gt;
Solution to this problem would be to login via Tunnelier and open up Remote Desktop Connection.&lt;br /&gt;
&lt;br /&gt;
=Configuring Sonicwall firewall to allow NEOSYS to update Nagios=&lt;br /&gt;
=== Configuring Sonicwall firewall to allow NEOSYS to update Nagios  ===&lt;br /&gt;
&lt;br /&gt;
This is documented at [[Sonicwall_Firewall_Configuration#Configuring_Sonicwall_firewall_to_allow_NEOSYS_to_update_Nagios|Configuring Sonicwall firewall to allow NEOSYS to update Nagios]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=File:SSL.jpg&amp;diff=1769</id>
		<title>File:SSL.jpg</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=File:SSL.jpg&amp;diff=1769"/>
		<updated>2014-10-21T11:33:26Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=User_talk:Arvind&amp;diff=1766</id>
		<title>User talk:Arvind</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=User_talk:Arvind&amp;diff=1766"/>
		<updated>2014-10-16T13:13:13Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Welcome!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to &#039;&#039;NEOSYS Technical Support Wiki&#039;&#039;!&#039;&#039;&#039;&lt;br /&gt;
We hope you will contribute much and well.&lt;br /&gt;
You will probably want to read the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents help pages].&lt;br /&gt;
Again, welcome and have fun! [[User:Nikhil|Nikhil]] ([[User talk:Nikhil|talk]]) 17:13, 16 October 2014 (GST)&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=User:Arvind&amp;diff=1765</id>
		<title>User:Arvind</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=User:Arvind&amp;diff=1765"/>
		<updated>2014-10-16T13:13:13Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Creating user page for new user.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;br /&gt;
Arvind Prasad Software Support Executive&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=New_Employee_Training_Checklist&amp;diff=1764</id>
		<title>New Employee Training Checklist</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=New_Employee_Training_Checklist&amp;diff=1764"/>
		<updated>2014-10-14T10:20:06Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Day 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Day 1==&lt;br /&gt;
#Create email Id  eg :- firstname.neosys@gmail.com &lt;br /&gt;
#Create Skype ID  eg:- firstname.neosys&lt;br /&gt;
#Create thunderbird  inbox’s   support@neosys.com, backup@neosys.com, nagios@neosys.com&lt;br /&gt;
#Create signature in thunderbird&lt;br /&gt;
#Create password for the computer/laptop&lt;br /&gt;
#Mails are sent out in Calibri font with font size 11&lt;br /&gt;
#Password file:- This file contains all usernames and passwords.  File name should be generic. The file is password protected, please refer link to create appropriate password for the file (http://techwiki.neosys.com/index.php/Procedures#Creating_and_Handling_passwords) .File should be placed under nested folders. The aim is to protect the file from being &lt;br /&gt;
#Create file to store client info ( clients details) column names:- host name, company name , location of company, time zone, which server is the NEOSYS hosted&lt;br /&gt;
#Make vm1.neosys.com as Firefox home page&lt;br /&gt;
#Go through Procedures in wiki&lt;br /&gt;
#Introduce nagios &lt;br /&gt;
#Read wiki page “Backup and Restore” &lt;br /&gt;
#Support suit login ID , wiki ID &lt;br /&gt;
#http://network-tools.com&lt;br /&gt;
&lt;br /&gt;
==Day 2 ==&lt;br /&gt;
#Check the clients file&lt;br /&gt;
#Explain backup procedure&lt;br /&gt;
#Show backup emails&lt;br /&gt;
#Share backup files &lt;br /&gt;
#Make the candidate do the morning backup-check routine.&lt;br /&gt;
#Explain http://techwiki.neosys.com/index.php/Procedures#NEOSYS_Maintenance_Window&lt;br /&gt;
#Explain different backup failures&lt;br /&gt;
#Various checks on why and how a backup failed. ( mail in inbox, nagios trends, neosys log, server event viewer)&lt;br /&gt;
#Share canned file &lt;br /&gt;
#NEOSYS login page and configuring NEOSYS&lt;br /&gt;
==Day 3==&lt;br /&gt;
#Go through Canned mails.&lt;br /&gt;
#Show examples on when each canned mails can be sent&lt;br /&gt;
#Do backups for the day. Mark backup in backup file.  &lt;br /&gt;
#Schedule downtime on nagios&lt;br /&gt;
#Various errors in Troubleshooting nagios to be looked at http://techwiki.neosys.com/index.php/Handling_Nagios_Client_Monitoring_System &lt;br /&gt;
&lt;br /&gt;
==Day 4==&lt;br /&gt;
#Handle backup issues, critical issues on nagios&lt;br /&gt;
#Email clients if they need to be informed about issues.&lt;br /&gt;
#Explain Getting Started and NEOSYS login process&lt;br /&gt;
#Explain Media Schedule (per brand, Client Brand file, Vehicle file, specification, material, dates, free ads,  Supplier file, booking, certifying, invoicing) &lt;br /&gt;
==Day 5==&lt;br /&gt;
#2 Assignments on Schedules ( booking, cancelation, rebooking, certify &amp;amp; invoicing )&lt;br /&gt;
#Creating on various client and brand , vehicle and supplier files&lt;br /&gt;
#Practice Media module&lt;br /&gt;
==Day 6==&lt;br /&gt;
#Handling damaged file with examples&lt;br /&gt;
#Quiz on Procedures, Nagios and Handling damaged files&lt;br /&gt;
==Day 7==&lt;br /&gt;
#Jobs Module completely and practice&lt;br /&gt;
#Explain Authorisation file (locks and keys, user ID , various levels etc)&lt;br /&gt;
==Day 8==&lt;br /&gt;
#How to Upgrade NEOSYS &lt;br /&gt;
#Upgrade a client&lt;br /&gt;
#Tested on TEST installation.&lt;br /&gt;
#Explain Zone edit, DNS&lt;br /&gt;
==Day 9==&lt;br /&gt;
#Free ads in Media schedule , how to replicate issues of clients&lt;br /&gt;
#Backup and Restoring NEOSYS&lt;br /&gt;
#Moving NEOSYS to new server/location etc&lt;br /&gt;
#Consolidated Backup ( Autologin.sh)&lt;br /&gt;
#System configuration file features and testing each field&lt;br /&gt;
&lt;br /&gt;
==Day 10==&lt;br /&gt;
#Request for a quick demo from the new staff&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1762</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1762"/>
		<updated>2014-10-06T11:22:12Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin with server reboot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrading cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Suggested method to maintain connectivity during cygwin upgrade&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
After the upgrade, REMOVE SETTINGS for unattended access and UNINSTALL Teamviewer. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem echo --- PAUSING 10 SECONDS TO ALLOW SHARED DLLS TO UNLOAD --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
ping -n 10 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### DO NOT KILL SSHD AND BASH PROCESSES IF YOU ARE CONNECTED ON SSH!      ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### OTHERWISE YOU WILL LOSE YOUR REMOTE CONNECTION AND NOT BE ABLE        ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### RECONNECT UNTIL SOMEONE RESTARTS SSHD ON THE SERVER BY                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### USING COMMAND &amp;quot;SSHD NET START SSHD&amp;quot;                                   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F How to check Cygwin version]&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
TODO: To be revised&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1761</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1761"/>
		<updated>2014-10-06T11:19:39Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Finding the script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrading cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Suggested method to maintain connectivity during cygwin upgrade&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
After the upgrade, REMOVE SETTINGS for unattended access and UNINSTALL Teamviewer. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem echo --- PAUSING 10 SECONDS TO ALLOW SHARED DLLS TO UNLOAD --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
ping -n 10 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### DO NOT KILL SSHD AND BASH PROCESSES IF YOU ARE CONNECTED ON SSH!      ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### OTHERWISE YOU WILL LOSE YOUR REMOTE CONNECTION AND NOT BE ABLE        ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### RECONNECT UNTIL SOMEONE RESTARTS SSHD ON THE SERVER BY                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### USING COMMAND &amp;quot;SSHD NET START SSHD&amp;quot;                                   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F How to check Cygwin version]&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=1760</id>
		<title>Setting up HTTPS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=1760"/>
		<updated>2014-10-02T10:33:37Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Export, Save and Import Certificates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Creating a single HTTPS web site on Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
Install selfssl.exe from Microsoft site (iis60rkt.exe available in neosys nl1 download folder) only the SSL utility is needed. This utility is already installed and available on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;displaylang=en&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-1.jpg]]&lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\IIS Resources\SelfSSL&amp;gt;selfssl.exe /N:CN=NEOSYS-SERVER /K:1024 /V:9999 /S:8 /P:4430 &lt;br /&gt;
 Microsoft (R) SelfSSL Version 1.0&lt;br /&gt;
 Copyright (C) 2003 Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
 Do you want to replace the SSL settings for site 1 (Y/N)?y&lt;br /&gt;
 Error opening metabase: 0x80040154&lt;br /&gt;
 C:\Program Files\IIS Resources\SelfSSL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*/n:CN=&#039;&#039;&#039;hostname&#039;&#039;&#039; indicates the full domain name of the site and depends on what you want to use (eg. clientname.hosts.neosys.com if the site is hosted on nl1/nl1b or clientname.support.neosys.com (if fixed IP) / clientname.redirectme.net (if dynamic IP) IF the site is hosted on the client server.&lt;br /&gt;
*/K:Key size. Use default 1024&lt;br /&gt;
*/V:9999 means valid for 9999 days&lt;br /&gt;
*/S:8 is the site number in this case (site number is shown in IIS management screen)&lt;br /&gt;
*/P:4430 is the non-standard port number NEOSYS uses by convention for SSL/HTTPS instead of the standard 443. 4430 can be replaced with custom port numbers in case the installation is on a NEOSYS server. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_site_in_IIS Creating a site in IIS on NEOSYS hosted server]&lt;br /&gt;
 &lt;br /&gt;
Ignore the &#039;&#039;&#039;Error opening metabase: 0x80040154&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next go to the IIS Manager and make sure the certificate was created and stored. Creating a certificate does not make it automatically bind to the website. &lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once you make sure it is created, then click on Sites &amp;gt; Default Website and in the right pane select Bindings:&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-3.jpg]]&lt;br /&gt;
&lt;br /&gt;
In the Bindings section - click on Add and select https, All Unassigned IP addresses, port 4430 and select the certificate from the drop down and press click on OK:&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-4.jpg]]&lt;br /&gt;
&lt;br /&gt;
Then test the site from explorer to make sure it works.&lt;br /&gt;
&lt;br /&gt;
== Creating a single HTTPS web site on Windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
Install selfssl.exe from Microsoft site (iis60rkt.exe available in neosys nl1 download folder) only the ssl utility is needed.&lt;br /&gt;
&lt;br /&gt;
http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;displaylang=en&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
[[Image:SelfSSL.png]]&lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\IIS Resources\SelfSSL&amp;gt;selfssl /v:9999 /s:&#039;&#039;&#039;&#039;&#039;866651215&#039;&#039;&#039;&#039;&#039; /p:4430 /n:CN=&#039;&#039;&#039;&#039;&#039;hostname&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
 Microsoft (R) SelfSSL Version 1.0&lt;br /&gt;
 Copyright (C) 2003 Microsoft Corporation. All rights reserved.&lt;br /&gt;
 Do you want to replace the SSL settings for site 866651215 (Y/N)?y&lt;br /&gt;
 The self signed certificate was successfully assigned to site 866651215.&lt;br /&gt;
&lt;br /&gt;
 /v:9999 means valid for 9999 days&lt;br /&gt;
 /s:&#039;&#039;&#039;&#039;&#039;866651215&#039;&#039;&#039;&#039;&#039; is the site number in this case   (site number is shown in IIS management screen)&lt;br /&gt;
 /p:4430 is the non-standard port number neosys uses by convention for ssl/https instead of the standard 443&lt;br /&gt;
 /n:CN=&#039;&#039;&#039;&#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; indicates the full domain name of the site and depends on what you want to use (eg. clientname.hosts.neosys.com if the site &lt;br /&gt;
  is hosted on nl1/nl1b or clientname.support.neosys.com (if fixed IP) / clientname.redirectme.net (if dynamic IP) IF the site is &lt;br /&gt;
  hosted on the client server.&lt;br /&gt;
&lt;br /&gt;
You probably made a mistake in the site number if you get the following message.&lt;br /&gt;
&lt;br /&gt;
 Error opening site metabase key: 0x80070003&lt;br /&gt;
&lt;br /&gt;
== Creating multiple HTTPS web sites on NEOSYS hosted server ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a site in IIS ===&lt;br /&gt;
&lt;br /&gt;
All clients hosted on NEOSYS servers use the same IP address, but different unique HTTPS port numbers starting from 4431 onwards. Similarly HTTP ports are configured with unique port numbers starting from 8123 onwards. The unique port number should be one greater than the highest port number available on the server under IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites.  &lt;br /&gt;
&lt;br /&gt;
==== Creating a site in IIS in Windows 2008 ====&lt;br /&gt;
&lt;br /&gt;
A port binding for HTTP is already created while configuring IIS.&lt;br /&gt;
&lt;br /&gt;
Follow the procedures as explained in [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008 Creating a Site in Win 2008] and add a port binding for HTTPS.&lt;br /&gt;
&lt;br /&gt;
==== Creating a site in IIS in Windows 2003 ====&lt;br /&gt;
&lt;br /&gt;
The https options are only available after running selfssl (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:httpadvancedwebsitesetup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Testing access to the new HTTPS web site. ===&lt;br /&gt;
&lt;br /&gt;
Make a subdomain &#039;&#039;&#039;clientname&#039;&#039;&#039;.hosts.neosys.com&lt;br /&gt;
&lt;br /&gt;
Open &amp;quot;https://&#039;&#039;&#039;clientname&#039;&#039;&#039;.hosts.neosys.com:44XX/neosys&amp;quot; in IE where 44XX is the designated port number&lt;br /&gt;
&lt;br /&gt;
If you get certificate error:&lt;br /&gt;
&lt;br /&gt;
#check that the selfsll /n:CN=&#039;&#039;&#039;clientname&#039;&#039;&#039;.hosts.neosys.com matches the domain name used in IE&lt;br /&gt;
#install the certificate into the client computer (double click the padlock, view certificates etc)&lt;br /&gt;
&lt;br /&gt;
Closing all internet explorer versions and restarting is necessary for installed certificates to become effective.&lt;br /&gt;
===Export, Remove and Import Certificates ===&lt;br /&gt;
&lt;br /&gt;
This step applies to both Windows 2003 and Windows 2008.&lt;br /&gt;
&lt;br /&gt;
The EXPORT/REMOVE/IMPORT stage is necessary where there are multiple https sites on one server since any subsequent SELFCERT seems to destroy all other sites done with SELFCERT that have not been exported/REMOVED/imported. &lt;br /&gt;
&lt;br /&gt;
Exporting and Importing certificates in Windows 2008 is just one part of the step to add certificates to sites and you need to follow the usual instructions to &amp;quot;bind&amp;quot; the certificate to a particular site.&lt;br /&gt;
&lt;br /&gt;
Certificates must be saved in d:\hosts\certificates preferably by name for easy reference otherwise by site number. If this is not done then if certificates need to be regenerated then you have the pain of supporting re-import of certificates by all users. &lt;br /&gt;
&lt;br /&gt;
#Export the certificate to a pfx file from IIS Manager &amp;gt; Click on Certificate &amp;gt; Export (to d:\hosts\certificates  - password to be set is in a text file in the same folder)&lt;br /&gt;
#Remove the certificate from IIS Manager&lt;br /&gt;
#Import pfx certificate back from IIS Manager&lt;br /&gt;
#*Use PASSWORD found in certificates folder&lt;br /&gt;
#*Make sure you select the &amp;quot;mark certificate as exportable&amp;quot; option &amp;lt;br&amp;gt;[[image:import-export.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up HTTPS for installations with more than 1 database==&lt;br /&gt;
&lt;br /&gt;
In cases where there are multiple databases within the same installation, the website can be made accessible via different URLs, one for each database, like database1.hosts.neosys.com and database2.hosts.neosys.com, though they will finally be pointing to the same website. In order to assign multiple URLs to the same website, simply repeat the steps for Creating a Single website in [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2003 Windows 2003] or [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008 Windows 2008] for each HTTPS URL that is required.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting setup of multiple HTTPS websites ==&lt;br /&gt;
&lt;br /&gt;
SelfSSL allows only one website to have SSL at a time in Windows 2003. However to avoid any issues in the future the solutions below have been provided for both Windows 2003 and 2008.&lt;br /&gt;
&lt;br /&gt;
=== Re-installing Certificates ===&lt;br /&gt;
&lt;br /&gt;
Sometimes due to an unknown issue, site/s stop working and hence there is a need to re-install the site certificate.&lt;br /&gt;
&lt;br /&gt;
===== Re-installing Certificates from saved PFX files =====&lt;br /&gt;
&lt;br /&gt;
#Unbind the certificate from the site&lt;br /&gt;
#Remove the certificate from IIS Manager&lt;br /&gt;
#Import pfx certificate back from IIS Manager&lt;br /&gt;
#*Use PASSWORD found in certificates folder&lt;br /&gt;
#*Make sure you select the &amp;quot;mark certificate as exportable&amp;quot; option &amp;lt;br&amp;gt;[[image:import-export.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Rebind the certificate&lt;br /&gt;
&lt;br /&gt;
===== Re-installing Certificates from selfssl =====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
If users have installed certificates in their browsers then they will have to reinstall them again to avoid the usual &amp;quot;certificate not trusted/matching&amp;quot; type problems.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Checklists&amp;diff=1759</id>
		<title>Checklists</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Checklists&amp;diff=1759"/>
		<updated>2014-10-02T10:23:53Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Instructions for filling checklists */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Instructions for filling checklists==&lt;br /&gt;
&lt;br /&gt;
* Steps that do not apply to NEOSYS-hosted server have a star next to its corresponding checkbox.&lt;br /&gt;
* Tick only the checkboxes of the steps that are completed.&lt;br /&gt;
* If a step is carried out differently from what is mentioned in the checklist, the reason for this must be specified as comments at the bottom of the checklist. These comments must be numbered as C1, C2 etc, and these comment numbers should be mentioned in the checkbox next to its corresponding step.&lt;br /&gt;
&lt;br /&gt;
== Windows 2003 Installation ==&lt;br /&gt;
&lt;br /&gt;
[[Media:Windows 2003_New_Installation_Checklist_with_remote_support.doc|New Installation Checklist with remote support]]&lt;br /&gt;
&lt;br /&gt;
[[Media:New_Installation_Checklist_(Finance_only)_&amp;amp;_without_remote_support.doc| New Installation Checklist (Finance Only) &amp;amp; without remote support]]&lt;br /&gt;
&lt;br /&gt;
== Windows 2008 Installation ==&lt;br /&gt;
&lt;br /&gt;
[[Media:Win 2008 New Installation Checklist.doc|New Installation Checklist]]&lt;br /&gt;
&lt;br /&gt;
== Shifting Servers ==&lt;br /&gt;
&lt;br /&gt;
[[Media:Shifting_servers_Checklist.doc|Shifting Servers Checklist‎]]&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1758</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1758"/>
		<updated>2014-10-02T07:29:32Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin remotely */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrading cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Suggested method to maintain connectivity during cygwin upgrade&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
After the upgrade, REMOVE SETTINGS for unattended access and UNINSTALL Teamviewer. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F How to check Cygwin version]&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1757</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1757"/>
		<updated>2014-09-30T11:01:03Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Verifying successful run */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrade cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F How to check Cygwin version]&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1756</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1756"/>
		<updated>2014-09-30T10:56:19Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin manually */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrade cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
See [http://techwiki.neosys.com/index.php/Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F How to check Cygwin version]&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1755</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1755"/>
		<updated>2014-09-30T05:41:48Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Changing user on Cygwin= */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrade cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1754</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1754"/>
		<updated>2014-09-29T12:35:36Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin remotely */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrade cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error. You must have the client server&#039;s administrator password to login using TeamViewer.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled after the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin===&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1753</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1753"/>
		<updated>2014-09-29T12:26:24Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin remotely */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained below.&lt;br /&gt;
&lt;br /&gt;
To maintain connectivity while upgrade cygwin, you can use:&lt;br /&gt;
*VNC server&lt;br /&gt;
*direct RDP connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*TeamViewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*Standard NEOSYS remote support connection using RDP/cygwin/sshd&lt;br /&gt;
*TeamViewer Quickstart started using a standard NEOSYS remote support connection.&lt;br /&gt;
*TeamViewer 9 due to the issue explained below&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer with unattended access TEMPORARILY to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 8 which does not give this error.&lt;br /&gt;
 &lt;br /&gt;
TeamViewer must be uninstalled afterward the upgrade because it is not secure and NEOSYS has no way to manage TeamViewer to limit connections by IP number like cygwin sshd.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available onsite to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin===&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=File:TVerror.jpg&amp;diff=1752</id>
		<title>File:TVerror.jpg</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=File:TVerror.jpg&amp;diff=1752"/>
		<updated>2014-09-29T12:23:05Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: uploaded a new version of &amp;quot;File:TVerror.jpg&amp;quot;:&amp;amp;#32;Error message that comes up when trying to connect to client server via TeamViewer 9.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Error message that comes up when trying to connect to client server via TeamViewer 9.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=File:TVerror.jpg&amp;diff=1751</id>
		<title>File:TVerror.jpg</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=File:TVerror.jpg&amp;diff=1751"/>
		<updated>2014-09-29T12:19:36Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: Error message that comes up when trying to connect to client server via TeamViewer 9.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Error message that comes up when trying to connect to client server via TeamViewer 9.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1750</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1750"/>
		<updated>2014-09-29T11:30:36Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin with server reboot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use but only if a reboot is performed and perhaps some cygwin packages reinstalled. &lt;br /&gt;
&lt;br /&gt;
You can use:&lt;br /&gt;
*vnc server&lt;br /&gt;
*direct rdp connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*teamviewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*standard NEOSYS remote support connection using rdp/cygwin/sshd&lt;br /&gt;
*teamviewer started using a standard NEOSYS remote support connection.&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer *temporarily* to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
Teamviewer must be uninstalled afterwards because it is not secure because NEOSYS has no way to manage TV to limit connections by IP number like cygwin sshd in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available onsite to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin===&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1749</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1749"/>
		<updated>2014-09-29T08:29:53Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Verifying successful run */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use but only if a reboot is performed and perhaps some cygwin packages reinstalled. &lt;br /&gt;
&lt;br /&gt;
You can use:&lt;br /&gt;
*vnc server&lt;br /&gt;
*direct rdp connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*teamviewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*standard NEOSYS remote support connection using rdp/cygwin/sshd&lt;br /&gt;
*teamviewer started using a standard NEOSYS remote support connection.&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer *temporarily* to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
Teamviewer must be uninstalled afterwards because it is not secure because NEOSYS has no way to manage TV to limit connections by IP number like cygwin sshd in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available onsite to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note -&#039;&#039;  If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin===&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1748</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1748"/>
		<updated>2014-09-29T08:09:33Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Upgrading Cygwin remotely */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
TODO correct mentions of server reboot&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use but only if a reboot is performed and perhaps some cygwin packages reinstalled. &lt;br /&gt;
&lt;br /&gt;
You can use:&lt;br /&gt;
*vnc server&lt;br /&gt;
*direct rdp connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*teamviewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*standard NEOSYS remote support connection using rdp/cygwin/sshd&lt;br /&gt;
*teamviewer started using a standard NEOSYS remote support connection.&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer *temporarily* to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
Teamviewer must be uninstalled afterwards because it is not secure because NEOSYS has no way to manage TV to limit connections by IP number like cygwin sshd in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available onsite to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note -&#039;&#039;  If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin===&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1747</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=1747"/>
		<updated>2014-09-29T08:07:37Z</updated>

		<summary type="html">&lt;p&gt;Nikhil: /* Finding the script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Do not use Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime to access the server from the internet since IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or even blank and in this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
&lt;br /&gt;
 Privilege                   –   YES&lt;br /&gt;
 New local sshd account      -   YES&lt;br /&gt;
 Install SSHD as a service   -   YES&lt;br /&gt;
 Enter value of daemon       -   press enter (not &amp;quot;ntsec&amp;quot; as it used to be)&lt;br /&gt;
 Different name              -   NO&lt;br /&gt;
 Create new privileged user  -   YES&lt;br /&gt;
 Enter a password now        -   Set any random password and should not be the same as the neosys server (8 characters min)&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use but only if a reboot is performed and perhaps some cygwin packages reinstalled. &lt;br /&gt;
&lt;br /&gt;
You can use:&lt;br /&gt;
*vnc server&lt;br /&gt;
*direct rdp connection&lt;br /&gt;
*directly on the server&lt;br /&gt;
*teamviewer started manually on the server&lt;br /&gt;
&lt;br /&gt;
You cannot use:&lt;br /&gt;
*standard NEOSYS remote support connection using rdp/cygwin/sshd&lt;br /&gt;
*teamviewer started using a standard NEOSYS remote support connection.&lt;br /&gt;
&lt;br /&gt;
Since cygwin cannot be upgraded while using tunnelier+cygwin/sshd, we can use tunnelier to setup Teamviewer *temporarily* to do the upgrade.&lt;br /&gt;
&lt;br /&gt;
Teamviewer must be uninstalled afterwards because it is not secure because NEOSYS has no way to manage TV to limit connections by IP number like cygwin sshd in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade. Therefore, since something could always go wrong and the script might FAIL to renable ssh remote connections, you should take one of the precautionary measures listed.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available onsite to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
Just locate the upgradecygwin.cmd script and run it some usual way by clicking and pressing Enter.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will reenable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and ntelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot; at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created as follows:&lt;br /&gt;
&lt;br /&gt;
Assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set THISIS=upgradecygwin.cmd version 2014-09-28T18:06&lt;br /&gt;
set TOEMAIL=support@neosys.com&lt;br /&gt;
set CYGWINBIN=c:\cygwin\bin&lt;br /&gt;
set CYGWINDLL=cygwin1.dll&lt;br /&gt;
set LOGFILE=upgradecygwin.log&lt;br /&gt;
set RESULT=&lt;br /&gt;
&lt;br /&gt;
if exist %LOGFILE% del %LOGFILE%&lt;br /&gt;
echo LOG OPENED &amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
date /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo This is %THISIS% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo It should be created and run in neosys\neosys folder where wget.exe is. &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo WARNING!!! It will disconnect and prevent ssh connections for the duration of the &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo upgrade so that cygwin1.dll and other dlls can be upgraded without issues&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** YOU MUST CHECK THIS EMAIL OR LOG FILE FOR ERROR AND FAIL ETC&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** AND IF UPGRADE IS SUCCESSFUL ALSO&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** VERIFY THAT THE VERSIONS &amp;quot;CYGWIN&amp;quot; AND &amp;quot;OPENSSH&amp;quot; ARE&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- ***** IN FACT THE REQUIRED LATEST VERSIONS NOS&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING FOR wget.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist wget.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT FIND WGET.EXE                                ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### THIS SCRIPT CURRENT DIR MUST CONTAIN WGET.EXE          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
 echo ok found &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DELETING ANY EXISTING SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if exist setup-x86.exe (&lt;br /&gt;
 del setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ok found and deleted setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
) else (&lt;br /&gt;
 echo ok not found&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- DOWNLOADING LATEST VERSION OF CYGWIN&#039;S SETUP-X86.EXE &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
wget -O setup-x86.exe http://www.cygwin.com/setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECKING SETUP-X86.EXE DOWNLOADED OK&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
if not exist setup-x86.exe (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE                          ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### COULD NOT DOWNLOAD http://www.cygwin.com/setup-x86.exe ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################## &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto emailandexit&lt;br /&gt;
)&lt;br /&gt;
rem dir setup-x86.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo ok setup-x86.exe downloaded&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- STOPPING ANY OTHER CYGWIN SERVICES LIKE RSYNC, EXIM (DOES NOT EXIST = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop exim &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- STOPPING SSHD SERVICE FOR MINIMUM TIME POSSIBLE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net stop sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- KILLING ANY CURRENT SSHD CONNECTIONS (NOT FOUND = OK) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im sshd.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
taskkill /f /im bash.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem seems to leave actual services running&lt;br /&gt;
rem echo --- KILLING ANY REMAINING CYGWIN SERVICES --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
rem taskkill /f /im cygrunsvr.exe &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem delay three seconds to ensure all stopped/killed&lt;br /&gt;
ping -n 3 127.0.0.1 &amp;gt; null&lt;br /&gt;
&lt;br /&gt;
echo .&amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CHECK THERE ARE NOW NO CYGWIN PROGRAMS RUNNING --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
set BACKUPDLL=cygwin1BACKUP.dll&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% del %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
copy %CYGWINBIN%\%CYGWINDLL% %CYGWINBIN%\%BACKUPDLL%&lt;br /&gt;
del %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%CYGWINDLL% (&lt;br /&gt;
 set RESULT=FAILURE&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### ERROR: CANNOT UPGRADE BECAUSE SOME CYGWIN PROGRAMS ARE STILL RUNNING  ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CLOSE THEM ALL AND TRY AGAIN OR                                       ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ### CHECK USING SYSINTERNALS PROCESS EXPLORER - FIND HANDLE %CYGWINDLL%   ### &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo ############################################################################# &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
 goto skipupgrade&lt;br /&gt;
)&lt;br /&gt;
ren %CYGWINBIN%\%BACKUPDLL% %CYGWINDLL%&lt;br /&gt;
if exist %CYGWINBIN%\%BACKUPDLL% copy %CYGWINBIN%\%BACKUPDLL% %CYGWINBIN%\%CYGWINDLL%&lt;br /&gt;
echo OK %CYGWINBIN%\%CYGWINDLL% is not in use and can be updated &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem ### RUNNING CYGWIN UPGRADE EVERYTHING NON-INTERACTIVE ###&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RUNNING CYGWIN UPGRADE --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:skipupgrade&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- RESTARTING SSHD SERVICE (TO REENABLE REMOTE SUPPORT ASAP) --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start sshd &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo ---STARTING CYGWINRSYNC IF PRESENT (IS INVALID = OK) &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
net start cygwinrsync &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo --- CHECKING CYGWIN VERSIONS &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
%CYGWINBIN%\cygcheck -c &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
:emailandexit&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- FINISHED upgradecygwin.cmd %RESULT% --- &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
echo fromaddress=upgradecygwin@neosys.com&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtphostname=mailout.neosys.com&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
echo smtpportno=2500&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
%CYGWINBIN%\echo -n &amp;quot;subject=Cygwin Upgrade: %RESULT% &amp;quot;&amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
dir ..\data\*. /B|%CYGWINBIN%\head -n 1 &amp;gt;&amp;gt; upgradecygwin.par&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- EMAILING LOG TO %TOEMAIL% &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
time /t &amp;gt;&amp;gt; %LOGFILE%&lt;br /&gt;
start /w sendmail.js /e upgradecygwin.err /p upgradecygwin.par /t %TOEMAIL% /b &amp;quot;@%LOGFILE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo . &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo --- CLOSING LOG &amp;gt;&amp;gt; %LOGFILE% 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
rem end of script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Upgrading Cygwin manually ====&lt;br /&gt;
&lt;br /&gt;
Install Teamviewer (will be commercial on server) and allow unattended access.&lt;br /&gt;
&lt;br /&gt;
Note the Teamviewer number and password during installation.&lt;br /&gt;
&lt;br /&gt;
Logout of tunnelier.&lt;br /&gt;
&lt;br /&gt;
Connect on teamviewer using the number and password&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net stop sshd&lt;br /&gt;
net stop cygwinrsync&lt;br /&gt;
net stop exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In task viewer, ensure no bash or ssh processes and kill any such processes.&lt;br /&gt;
&lt;br /&gt;
Run the cygwin upgrade procedure starting with http://www.cygwin.com and setup.exe etc. If you get any message about file in use, do not ignore, make sure you kill all cygwin related processes in task manager. If necessary find and kill the process holding the files open. For example using sysinternal’s process explorer “find file handle”&lt;br /&gt;
&lt;br /&gt;
If not already done, rename Administrator to administrator and run mkpasswd/mkgroup in Cygwin console. (See [[Setting_up_and_using_remote_support#Changing_ssh_login_from_.E2.80.9CAdministrator.E2.80.9D_to_.E2.80.9Cadministrator.E2.80.9D|Changing ssh login from “Administrator” to “administrator”]])&lt;br /&gt;
&lt;br /&gt;
In command console type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkpasswd -l &amp;gt; /etc/passwd&lt;br /&gt;
mkgroup -l &amp;gt; /etc/group&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the NEOSYS remote connection service - cygwin/sshd, and any cygwin services stopped:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net start sshd&lt;br /&gt;
net start cygwinrsync&lt;br /&gt;
net start exim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login using tunnelier. If successful, close your Teamviewer on the server&lt;br /&gt;
&lt;br /&gt;
Uninstall Teamviewer and REMOVE SETTINGS to avoid accidental reinstallation. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with server reboot ====&lt;br /&gt;
If not already done, rename Windows “Administrator” user to “administrator” before upgrading&lt;br /&gt;
&lt;br /&gt;
Connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
Follow the usual cygwin installation procedure.&lt;br /&gt;
&lt;br /&gt;
If and when cygwin &amp;quot;says files in use&amp;quot; then at console command prompt then click &amp;quot;continue&amp;quot;. NB &amp;quot;retry&amp;quot; will not work because your NEOSYS  remote support uses files like cygwin1.dll that are being updated by cygwin.&lt;br /&gt;
&lt;br /&gt;
If you have used the &amp;quot;continue&amp;quot; option then, towards the end of the cygwin installation process, you may get error messages similar to the one below.&lt;br /&gt;
You can ignore them.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;the procedure point __ctype_ptr__ could not be located in the dynamic link library cygwin1.dll&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, you may get a message &amp;quot;postinstall script errors&amp;quot;. Copy this message so you know what packages have to be reinstalled.&lt;br /&gt;
&lt;br /&gt;
Your list may vary! The list of packages is longer if the cygwin1.dll file has to be upgraded as this is an essential library file for all cygwin programs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package: base-cygwin&lt;br /&gt;
 Package: coreutils&lt;br /&gt;
 Package: bash&lt;br /&gt;
 Package: terminfo&lt;br /&gt;
 Package: _update-info-dir&lt;br /&gt;
 Package: base-files&lt;br /&gt;
 Package: colordiff&lt;br /&gt;
 Package: man&lt;br /&gt;
 Package: terminfo0&lt;br /&gt;
 Package: vim&lt;br /&gt;
 Package: wget&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the server&lt;br /&gt;
&lt;br /&gt;
Reinstall Bash and check that you can connect using usual NEOSYS remote support.&lt;br /&gt;
&lt;br /&gt;
*The login user name might be changed to &amp;quot;Administrator&amp;quot; instead of &amp;quot;administrator&amp;quot;.&lt;br /&gt;
*If you cannot reconnect after rebooting then the following steps (in particular the cygwin sshd package) may have to be performed directly on the server directly or using the usual initial NEOSYS remote installation procedures that do not rely on cygwin/sshd.&lt;br /&gt;
&lt;br /&gt;
Reinstall any problematic Cygwin packages&lt;br /&gt;
#Select View: &amp;quot;Up to date&amp;quot;&lt;br /&gt;
#&amp;quot;Keep&amp;quot; to &amp;quot;Reinstall&amp;quot; for the packages listed in the previous section.&lt;br /&gt;
&lt;br /&gt;
Check that you can run the ls command in a cygwin command prompt window.&lt;br /&gt;
&lt;br /&gt;
Finally, check the version of the packages you installed using the cygcheck command mentioned below to ensure that they have been upgraded.&lt;br /&gt;
&lt;br /&gt;
For eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note -&#039;&#039;  If you dont reinstall bash after rebooting then the bash prompt will be abbreviated to something different and there will be no response to any command entered.&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version.&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd/DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygrin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin===&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;/div&gt;</summary>
		<author><name>Nikhil</name></author>
	</entry>
</feed>