<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>TechniTip.Net &#187; ssh</title> <atom:link href="http://technitip.net/tag/ssh/feed" rel="self" type="application/rss+xml" /><link>http://technitip.net</link> <description>TechniTip.Net - Useful tips regarding technical stuff for things like Linux, MySQL, Apache, PHP, Linux Server, iPhone and more.</description> <lastBuildDate>Fri, 03 Feb 2012 18:31:08 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <image><link>http://technitip.net</link> <url>http://technitip.net/wp-content/plugins/maxblogpress-favicon/icons/favicon-66.ico</url><title>TechniTip.Net</title> </image> <item><title>Running Rsync and Sudo over SSH</title><link>http://technitip.net/running-rsync-and-sudo-over-ssh</link> <comments>http://technitip.net/running-rsync-and-sudo-over-ssh#comments</comments> <pubDate>Thu, 07 Apr 2011 11:03:12 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[root]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sudo]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1818</guid> <description><![CDATA[I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement PermitRootLogin no. For sure this is [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/socket-address-family-not-supported-by-protocol' rel='bookmark' title='socket: Address family not supported by protocol'>socket: Address family not supported by protocol</a></li><li><a
href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement <em>PermitRootLogin no. </em>For sure this is the recommended setting if your server to backup has a public IP address.</p><p>A nice and easy solution which works best for me is to use sudo. This will allow to run rsync via ssh and sudo. To get it running you have to add an entry into your sudoers config file:</p><p>/etc/sudoers</p><pre>backup_user ALL=(root)NOPASSWD:/usr/bin/rsync</pre><p>This will allow the user <em>backup_user</em> to run the command <em>rsync</em> as root.</p><p>Next step is to add an <em>rsync-path</em> parameter to the remote rsync call:</p><pre>rsync --rsync-path="sudo rsync" backup_user@myhosttobackup.net:/root /backup_directory</pre><p>Finally rsync will automatically do an sudo to root on the remote server and all to backup all files owned by root as well.</p><p><strong>Links:</strong></p><ul><li><a
title="Rsync and sudo over SSH" href="http://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/" target="_blank">Rsync and sudo over SSH</a></li></ul><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Frunning-rsync-and-sudo-over-ssh&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/socket-address-family-not-supported-by-protocol' rel='bookmark' title='socket: Address family not supported by protocol'>socket: Address family not supported by protocol</a></li><li><a
href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/running-rsync-and-sudo-over-ssh/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>socket: Address family not supported by protocol</title><link>http://technitip.net/socket-address-family-not-supported-by-protocol</link> <comments>http://technitip.net/socket-address-family-not-supported-by-protocol#comments</comments> <pubDate>Sun, 30 Jan 2011 09:46:31 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Linux Server]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sshd]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1637</guid> <description><![CDATA[I&#8217;m using rsync via ssh on my Linux NAS, it works nice. But I was wondering what could cause the message: socket: Address family not supported by protocol The message appears every time rsync or just ssh is called. In my case the reason is that ssh tries to connect via IPv6 first and afterwards [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>I&#8217;m using rsync via ssh on my Linux NAS, it works nice. But I was wondering what could cause the message:<br
/> <code><br
/> socket: Address family not supported by protocol</code></p><p>The message appears every time rsync or just ssh is called. In my case the reason is that ssh tries to connect via IPv6 first and afterwards with IPv4. Since I&#8217;ve not setup IPv6 on my NAS the connect fails and the message above appears. It&#8217;s not a big harm but it&#8217;s nicer to remove this message.</p><p>Removing the message is esay, just add -4 as command line parameter to ssh:</p><p><code>-4      Forces ssh to use IPv4 addresses only.<br
/> </code></p><p>For ssh or rsync the usage looks like:</p><p><code><br
/> ssh -4<br
/> rsync -e "ssh -4"<br
/> </code></p><p>And the message disappears.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fsocket-address-family-not-supported-by-protocol&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/socket-address-family-not-supported-by-protocol/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Continous SSH Attacks</title><link>http://technitip.net/continous-ssh-attacks</link> <comments>http://technitip.net/continous-ssh-attacks#comments</comments> <pubDate>Sun, 12 Apr 2009 21:02:17 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[attack]]></category> <category><![CDATA[attacks]]></category> <category><![CDATA[brute]]></category> <category><![CDATA[continious]]></category> <category><![CDATA[force]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://technitip.net/?p=887</guid> <description><![CDATA[As written in a previous article Defending Againt SSH Attacks I think it&#8217;s really worth trying to install a tool like denyhosts. Since about 5 days denyhosts blocks IP addresses from all over the world every few minutes. In total now more than 550 different blocked IP addresses. The reason seems that the IP address of [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/defending-againt-ssh-attacks' rel='bookmark' title='Defending Againt SSH Attacks'>Defending Againt SSH Attacks</a></li><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>As written in a previous article <a
href="http://technitip.net/defending-againt-ssh-attacks" title="Defending Againt SSH Attacks">Defending Againt SSH Attacks</a> I think it&#8217;s really worth trying to install a tool like <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a>. Since about 5 days denyhosts blocks IP addresses from all over the world every few minutes. In total now more than 550 different blocked IP addresses.</p><p>The reason seems that the IP address of my server has been added to a bot network which tries to hack servers using SSH brute force attacks. As far as I know such bot networks are built up  with Viruses and Trojans. I think there is no reason why your server may have also been added to such a list, somehow IP addresses seem to added.</p><p>But the question is how to defend against such brute force attacks from bot networks?</p><p><strong>Known Methods</strong></p><ul><li>Install a tool like <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a></li><li>Always keep the SSH daemon up to date!</li><li>Move the SSH port from 22 to some other port</li><li>Disable password authentication and use key authentication</li><li>Slow down the amount of connections from the same IP using iptables and module &#8220;recent&#8221;</li><li>Open the SSH port after a trigger on a different port using iptables</li></ul><p>I think there is one additional easy method to defend against such attacks. Why I think so? Read on..</p><p><strong>Another Simple Method<br
/> </strong></p><p>When checking the auth.log we see that the user names of the attacks are taken from a dictionary:</p><p><code>Failed	keyboard-interactive/pam	for	invalid	user	aderes from 195.xxx.xxx.xx port 39566 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	aderyn from 203.xxx.xxx.xx port 44099 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adi from 78.xxx.xxx.xx port 42748 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adia from 89. port 51028 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adiel from 217. port 33861 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adila from 77. port 52867 ssh2<br
/> </code>It seems that the bots are not adding digits to the user names. So I think one easy method to defend against such attacks is:</p><ul><li><strong>add at least one digit to user names</strong> on your server if you have the possibility</li></ul><p>And definitely <strong>never ever</strong> add a user &#8220;admin&#8221;. In my logs the user &#8220;admin&#8221; is always used for brute force attacks:</p><p><code>Failed	keyboard-interactive/pam	for	invalid	user	admin from 203.xxx.xxx.xx port 39711 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 203.xxx.xxx.xx port 55493 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 220.xxx.xxx.xx port 34502 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 80.xxx.xxx.xx port 51846 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 80.xxx.xxx.xx port 53934 ssh2</code></p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fcontinous-ssh-attacks&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/defending-againt-ssh-attacks' rel='bookmark' title='Defending Againt SSH Attacks'>Defending Againt SSH Attacks</a></li><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/continous-ssh-attacks/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SSH Client for the iPhone</title><link>http://technitip.net/ssh-client-for-the-iphone</link> <comments>http://technitip.net/ssh-client-for-the-iphone#comments</comments> <pubDate>Fri, 10 Apr 2009 12:42:12 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[iPhone]]></category> <category><![CDATA[Client]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[TouchTerm]]></category> <guid
isPermaLink="false">http://technitip.net/?p=838</guid> <description><![CDATA[Definitely a useful tool for network administrator or people dealing with Linux servers: TouchTerm. Two versions are available: light and pro. I&#8217;ve running the light version on my iPhone. The pro version comes with gestures, additional plug ins and many more. TouchTerm supports the landscape mode as well. SSH connections are managed with a session [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/vnc-client-for-iphone' rel='bookmark' title='VNC Client for iPhone'>VNC Client for iPhone</a></li><li><a
href='http://technitip.net/network-utility-for-iphone' rel='bookmark' title='&#8220;Network Utility&#8221; for iPhone'>&#8220;Network Utility&#8221; for iPhone</a></li><li><a
href='http://technitip.net/iphone-whois-tool-domain-scout' rel='bookmark' title='Whois Tool &#8220;Domain Scout&#8221; for iPhone'>Whois Tool &#8220;Domain Scout&#8221; for iPhone</a></li></ol></div>]]></description> <content:encoded><![CDATA[
<a
href="http://technitip.net/wp-content/gallery/iphonevpn/img_0027.jpg" title="" class="shutterset_singlepic60" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/60__120x_img_0027.jpg" alt="img_0027.jpg" title="img_0027.jpg" /> </a> <a
href="http://technitip.net/wp-content/gallery/iphonevpn/img_0028.jpg" title="" class="shutterset_singlepic61" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/61__120x_img_0028.jpg" alt="img_0028.jpg" title="img_0028.jpg" /> </a><p>Definitely a useful tool for network administrator or people dealing with Linux servers: <a
title="TouchTerm" href="http://jbrink.net/touchterm/" target="_blank">TouchTerm</a>. Two versions are available: light and pro. I&#8217;ve running the light version on my iPhone. The pro version comes with gestures, additional plug ins and many more.</p><p><a
title="TouchTerm" href="http://jbrink.net/touchterm/" target="_blank">TouchTerm</a> supports the landscape mode as well. SSH connections are managed with a session manager, which makes in unnecessary to enter host names for every connection.</p> <a
href="http://technitip.net/wp-content/gallery/iphonevpn/img_0029.jpg" title="" class="shutterset_singlepic62" > <img
class="ngg-singlepic ngg-left" src="http://technitip.net/wp-content/gallery/cache/62__290x_img_0029.jpg" alt="img_0029.jpg" title="img_0029.jpg" /> </a> <a
href="http://technitip.net/wp-content/gallery/iphonevpn/img_0030.jpg" title="" class="shutterset_singlepic63" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/63__290x_img_0030.jpg" alt="img_0030.jpg" title="img_0030.jpg" /> </a><p><strong>Links:</strong></p><ul><li><a
title="TouchTerm Homepage" href="http://jbrink.net/touchterm/" target="_blank">TouchTerm homepage</a></li><li><a
title="TouchTerm SSH" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=286623227&amp;mt=8" target="_blank">TouchTerm SSH (iTunes link)</a></li><li><a
title="TouchTerm Pro SSH" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=296468040&amp;mt=8" target="_blank">TouchTerm Pro SSH (iTunes link)</a></li></ul><p></p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fssh-client-for-the-iphone&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/vnc-client-for-iphone' rel='bookmark' title='VNC Client for iPhone'>VNC Client for iPhone</a></li><li><a
href='http://technitip.net/network-utility-for-iphone' rel='bookmark' title='&#8220;Network Utility&#8221; for iPhone'>&#8220;Network Utility&#8221; for iPhone</a></li><li><a
href='http://technitip.net/iphone-whois-tool-domain-scout' rel='bookmark' title='Whois Tool &#8220;Domain Scout&#8221; for iPhone'>Whois Tool &#8220;Domain Scout&#8221; for iPhone</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/ssh-client-for-the-iphone/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>PuTTY SSH Login Without Password Prompt</title><link>http://technitip.net/putty-ssh-login-without-password-prompt</link> <comments>http://technitip.net/putty-ssh-login-without-password-prompt#comments</comments> <pubDate>Sat, 21 Feb 2009 18:45:38 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[authorized_keys]]></category> <category><![CDATA[Login]]></category> <category><![CDATA[Password]]></category> <category><![CDATA[Prompt]]></category> <category><![CDATA[Putty]]></category> <category><![CDATA[RSA]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[Without]]></category> <guid
isPermaLink="false">http://technitip.net/?p=666</guid> <description><![CDATA[Annoyed of typing login passwords? Your desktop is running with Windows and you often need to connect remote servers using SSH then you will already know PuTTY. You will also know that it&#8217;s getting frustrating to enter the passoword every time. There is a simple way to login to remote machines using RSA/DAS keys. What [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/enable-wordpress-auto-login' rel='bookmark' title='Enable WordPress Auto-Login'>Enable WordPress Auto-Login</a></li><li><a
href='http://technitip.net/bash-prompt-too-long' rel='bookmark' title='Bash Prompt too long?'>Bash Prompt too long?</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p><strong>Annoyed of typing login passwords?</strong></p><p>Your desktop is running with Windows and you often need to connect remote servers using SSH then you will already know <a
title="PuTTY: A Free Telnet/SSH Client" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">PuTTY</a>. You will also know that it&#8217;s getting frustrating to enter the passoword every time. There is a simple way to login to remote machines using RSA/DAS keys.</p><p><strong>What is needed?</strong></p><p>First of all you will need to download the <a
title="Putty.exe download" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY.exe</a>. And to generate the keys on your Windows desktop you&#8217;ll need to download  <a
title="Putty.exe download" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTYgen.exe</a> as well.</p><p><strong>Key Generation</strong></p><p>Start PuTTYgen.exe after download and press the Generate button. Now follow the instruction and move the mouse cursor over the desired area. I&#8217;ve used the default parameter [x] SSH-2 RSA with a key length of 1024 bits.</p><p>I leave the Key passphrase empty because I don&#8217;t want to enter any passwords during login.</p><p> <a
href="http://technitip.net/wp-content/gallery/test/putty-key-generator-21022009-183726.jpg" title="" class="shutterset_singlepic34" > <img
class="ngg-singlepic ngg-left" src="http://technitip.net/wp-content/gallery/cache/34__295x_putty-key-generator-21022009-183726.jpg" alt="putty-key-generator-21022009-183726.jpg" title="putty-key-generator-21022009-183726.jpg" /> </a> <a
href="http://technitip.net/wp-content/gallery/test/putty-key-generator-21022009-183824.jpg" title="" class="shutterset_singlepic35" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/35__295x_putty-key-generator-21022009-183824.jpg" alt="putty-key-generator-21022009-183824.jpg" title="putty-key-generator-21022009-183824.jpg" /> </a></p><p>To have the key later available for other servers use the &#8220;Save public key&#8221; and &#8220;Save private key&#8221; button. My private key is saved as <em>haifisch.ppk</em> and my public key as <em>haifisch</em>. By the way, haifisch is German and means shark.</p><p>Now mark the generated public key, copy it to the clip board and paste it into <em>~/.ssh/authorized_keys</em> file on the remote server of the user you want to login as.</p><p> <a
href="http://technitip.net/wp-content/gallery/test/save-private-key-as-21022009-183913.jpg" title="" class="shutterset_singlepic36" > <img
class="ngg-singlepic ngg-left" src="http://technitip.net/wp-content/gallery/cache/36__295x_save-private-key-as-21022009-183913.jpg" alt="save-private-key-as-21022009-183913.jpg" title="save-private-key-as-21022009-183913.jpg" /> </a> <a
href="http://technitip.net/wp-content/gallery/test/putty-key-generator-21022009-192015.jpg" title="" class="shutterset_singlepic37" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/37__295x_putty-key-generator-21022009-192015.jpg" alt="putty-key-generator-21022009-192015.jpg" title="putty-key-generator-21022009-192015.jpg" /> </a></p><p><strong>PuTTY Configuration<br
/> </strong></p><p>Keys have been generated and stored on the remote server, therefore PuTTYgen can be closed now and the PuTTY.exe is needed now.</p><p>In PuTTY under the item &#8220;Session&#8221; enter the host name of the remote server and connection type SSH. Next choose &#8220;Connection/Data&#8221; and enter the remote user name. Also the previously defined private key is needed, it is given in &#8220;Connection/SSH/Auth&#8221; using the &#8220;Browse&#8221; button. In my case it&#8217;s <em>haifisch.ppk</em>.</p><p> <a
href="http://technitip.net/wp-content/gallery/test/putty-configuration-21022009-193323.jpg" title="" class="shutterset_singlepic38" > <img
class="ngg-singlepic ngg-left" src="http://technitip.net/wp-content/gallery/cache/38__295x_putty-configuration-21022009-193323.jpg" alt="putty-configuration-21022009-193323.jpg" title="putty-configuration-21022009-193323.jpg" /> </a> <a
href="http://technitip.net/wp-content/gallery/test/putty-configuration-21022009-193323.jpg" title="" class="shutterset_singlepic38" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/38__295x_putty-configuration-21022009-193323.jpg" alt="putty-configuration-21022009-193323.jpg" title="putty-configuration-21022009-193323.jpg" /> </a></p><p>When all settings are done go back to &#8220;Session&#8221;, enter a name for this session and press &#8220;Save&#8221;.</p><p>That&#8217;s it. Try it by double clicking on the saved session.</p><p><strong>Login via Desktop Icon</strong></p><p>If you want to have a desktop icon which opens putty and logs into a remote server generate a file e.g. www.myserver.com.bat with the content:</p><p><code>start C:\temp\putty\putty.exe -load "Session Name in PuTTY"</code></p><p>Now generate a link to this batch file on your desktop and login in by double clicking.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fputty-ssh-login-without-password-prompt&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/enable-wordpress-auto-login' rel='bookmark' title='Enable WordPress Auto-Login'>Enable WordPress Auto-Login</a></li><li><a
href='http://technitip.net/bash-prompt-too-long' rel='bookmark' title='Bash Prompt too long?'>Bash Prompt too long?</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/putty-ssh-login-without-password-prompt/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Defending Againt SSH Attacks</title><link>http://technitip.net/defending-againt-ssh-attacks</link> <comments>http://technitip.net/defending-againt-ssh-attacks#comments</comments> <pubDate>Tue, 30 Dec 2008 11:39:58 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[attacks]]></category> <category><![CDATA[defending]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://planlos.org/~harry/php/?p=56</guid> <description><![CDATA[As soon as you put a server online you will recognize many many attempts accessing the SSH port like these one: Dec 28 06:48:11 hostname sshd[12258]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=somehost.somewhere Dec 28 06:48:12 hostname sshd[12256]: error: PAM: User not known to the underlying authentication module for illegal user saman from [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/continous-ssh-attacks' rel='bookmark' title='Continous SSH Attacks'>Continous SSH Attacks</a></li><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>As soon as you put a server online you will recognize many many attempts accessing the SSH port like these one:<br
/> <code>Dec 28 06:48:11 hostname sshd[12258]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=somehost.somewhere<br
/> Dec 28 06:48:12 hostname sshd[12256]: error: PAM: User not known to the underlying authentication module for illegal user saman from somehost.somewhere<br
/> Dec 28 06:48:13 hostname sshd[12256]: Failed keyboard-interactive/pam for invalid user saman from xx.xxx.xx.xxx port 27751 ssh2</code><br
/> Annoying script kids&#8230; An easy method to protect at least a little bit against such attacks is a tool called <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a>. I use it on all my servers because it&#8217;s easy to install. <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a> automatically blocks ssh attacks by adding entries to /etc/hosts.deny.</p><p>Using debian Etch installation is really simple:</p><pre>apt-get install denyhosts</pre><p>Next edit /etc/denyhosts.conf and change:</p><pre>PURGE_DENY = 1w
PURGE_THRESHOLD = 0</pre><p>and start the daemon:</p><pre>/etc/init.d/denyhosts start</pre><p>That&#8217;s all. Sure it&#8217;s not a perfect solution which helps for everything, but nevertheless it will increase your security.</p><p>All you have to to now is wait and check the /etc/hosts.deny Depending on your configuration <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a> will automatically delete expired entries.<br
/> <span
id="sample-permalink"><span
id="editable-post-name" title="Klicken Sie, um diesen Teil des Permalinks zu bearbeiten."></span></span></p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fdefending-againt-ssh-attacks&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/continous-ssh-attacks' rel='bookmark' title='Continous SSH Attacks'>Continous SSH Attacks</a></li><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/defending-againt-ssh-attacks/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
