{"id":623,"date":"2009-02-25T00:08:37","date_gmt":"2009-02-25T05:08:37","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=623"},"modified":"2011-08-03T15:38:29","modified_gmt":"2011-08-03T20:38:29","slug":"cygwinx-ssh","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=623","title":{"rendered":"Cygwin\/X SSH"},"content":{"rendered":"<span id=\"Download_setup.exe\"><h3>Download setup.exe<\/h3><\/span>\n<p>* Download Cygwin <a href=\"http:\/\/cygwin.com\/setup.exe\"><strong>setup.exe<\/strong><\/a> from <a href=\"http:\/\/cygwin.com\/\">cygwin.com<\/a>. There is no difference between &#8220;Install Cygwin Now&#8221; and &#8220;Install Cygwin\/X Now&#8221; buttons.<br \/>\n* Move setup.exe to a local folder where you would also like to store downloaded Cygwin files, e.g. <strong>c:\\download\\cygwin<\/strong>.<\/p>\n<span id=\"Install_Cygwin_X11_and_OpenSSH\"><h3>Install Cygwin, X11 and OpenSSH<\/h3><\/span>\n<p>* Double click<strong> setup.exe<\/strong> to startup download and installation.<br \/>\n* Choose <strong>Install from internet<\/strong>.<br \/>\n* Set root directory, <strong>e.g. c:\\cygwin<\/strong>.<br \/>\n* Accept Local Package Directory, <strong>e.g. c:\\download\\cygwin<\/strong>.<br \/>\n* Choose <strong>Direct Connection<\/strong> if you&#8217;re directly connected to the internet.<br \/>\n* Choose download site, e.g. <strong>ftp:\/\/ftp.gtlib.gatech.edu<\/strong>.<br \/>\n* In the upper left corner, type <strong>X11<\/strong> in the search field. Note the capital <strong>X<\/strong>.<br \/>\n* Select to install the whole <strong>X11<\/strong> category at the bottom of the package list by clicking the <strong>two-arrow symbol<\/strong> until text after it changes to &#8220;<strong>install<\/strong>&#8220;.<br \/>\n* Click the &#8220;<strong>View<\/strong>&#8221; button so all the packages are listed alphabetically.<br \/>\n* Type <strong>openssh<\/strong> in the search field.<br \/>\n* Find &#8220;<strong>openssh<\/strong>&#8221; package. Click the <strong>double-arrow symbol<\/strong> until the text after it changes to install or package version numbers, e.g. <strong>5.8p 1-1<\/strong>.<br \/>\n* Click <strong>Next <\/strong>and wait for the selected packages (Cygwin, X11 and openssh) to be downloaded and installed.<br \/>\n* Click <strong>Finish <\/strong>when done.<\/p>\n<span id=\"Start_CygwinX_SSH_Session\"><h3>Start Cygwin\/X SSH Session<\/h3><\/span>\n<p>* Click <strong>Cygwin <\/strong>shortcut to bring up the Cygwin window.<br \/>\n* Type <strong>startx<\/strong> to bring up the Cygwin\/X window (Cygwin\/X:0.0).<br \/>\n* In one of the xterm, type <\/p>\n<pre>ssh -Y -l username remote_hostname_or_ip_address<\/pre>\n<p>* Remote X windows such as Java GUI can now be shown on Cygwin\/X.<\/p>\n<p><strong>References<\/strong><br \/>\n<a href=\"http:\/\/x.cygwin.com\/docs\/ug\/\">Cygwin\/X User&#8217;s Guide<\/a><br \/>\n<a href=\"http:\/\/cygwin.com\/ml\/cygwin-xfree\/2002-10\/msg00065.html\">Cygwin SSH Notes<\/a><br \/>\n<a href=\"http:\/\/x.cygwin.com\/docs\/faq\/cygwin-x-faq.html\">Cygwin\/X Frequently Asked Questions<\/a><\/p>\n<span id=\"Misc_Commands\"><h3>Misc Commands<\/h3><\/span>\n<pre>\r\n# sync up local accounts\r\n$mkpasswd -l > \/etc\/passwd\r\n\r\n# Using an alternate home root\r\n$ mkpasswd -l -p \"$(cygpath -H)\" > \/etc\/passwd\r\n<\/pre>\n<span id=\"Enable_Back_arrow_key\"><h3>Enable Back arrow key<\/h3><\/span>\n<p>To permanently enable back arrow key in xterms:<br \/>\n* Create a file called .Xdefaults in home directory.<br \/>\n* Add to .Xdefaults file:<\/p>\n<pre lang=\"bash\">\r\n*ttyModes: erase ^H \r\n<\/pre>\n<span id=\"Uninstall_Cygwin_from_Windows_XP\"><h3>Uninstall Cygwin from Windows XP<\/h3><\/span>\n<p>* Remove all installed services<\/p>\n<pre>\r\n# Remove sshd service\r\n$ cygrunsrv --stop sshd\r\n$ cygrunsrv --remove sshd\r\n$ net user sshd delete\r\n\r\n# Remove cron service\r\n$ cygrunsrv --stop cron\r\n$ cygrunsrv --remove cron\r\n$ net user cron delete\r\n\r\n# Remove syslog-ng service\r\n$ cygrunsrv --stop syslog-ng\r\n$ cygrunsrv --remove syslog-ng\r\n\r\n<\/pre>\n<p>* Delete the folder c:\\cygwin and all its sub-folders.<br \/>\n* Remove the Environment Variable CYGWIN.<br \/>\n* Edit the Environment path accordingly.<br \/>\n* Start -> Run -> regedit and delete these two registry trees<\/p>\n<pre>\"HKEY_CURRENT_USER_Software_Cygnus Solutions\"\r\n\"HKEY_LOCAL_MACHINE_Software_Cygnus Solutions\"<\/pre>\n<p>* Go to Control Panel -> Category View -> Performance and Maintenance -> Administrative Tools -> Computer Management (or click Start -> Run -> compmgmt.msc):<br \/>\n&#8211; Delete the sshd user if it exists in the &#8220;System Tools&#8221; &#8211; &#8220;Local Users and Groups&#8221; &#8211; &#8220;Users&#8221; section.<br \/>\n&#8211; Delete cron user if it exists in the &#8220;System Tools&#8221; &#8211; &#8220;Local Users and Groups&#8221; &#8211; &#8220;Users&#8221; section.<br \/>\nReference: <a href=\"http:\/\/pigtail.net\/LRP\/printsrv\/remove-cygwin.html\">http:\/\/pigtail.net\/LRP\/printsrv\/remove-cygwin.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download setup.exe * Download Cygwin setup.exe from cygwin.com. There is no difference between &#8220;Install Cygwin Now&#8221; and &#8220;Install Cygwin\/X Now&#8221; buttons. * Move setup.exe to a local folder where you would also like to store downloaded Cygwin files, e.g. c:\\download\\cygwin. &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=623\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[60,33,10],"tags":[],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-cygwin","category-unix","category-winos"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-a3","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=623"}],"version-history":[{"count":11,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":625,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/623\/revisions\/625"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}