<?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>InstaCarma Blog &#187; ssh</title>
	<atom:link href="http://instacarma.com/blog/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://instacarma.com/blog</link>
	<description>Information Resource for Web Hosting Technical Support and Server Management</description>
	<lastBuildDate>Sat, 04 Sep 2010 16:06:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to create a large file for testing purpose ?</title>
		<link>http://instacarma.com/blog/technical/how-to-create-a-large-file-for-testing-purpose/</link>
		<comments>http://instacarma.com/blog/technical/how-to-create-a-large-file-for-testing-purpose/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 18:14:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1167</guid>
		<description><![CDATA[Issue : How can a large file, say 1GB, for some testing purposes be created? Solution : Use the following command : dd if=/dev/zero of= filename bs=1024 count=1024number of 0&#8242;s Replace &#8216;filename&#8217; with the actual filename. Replace &#8216;number of 0&#8242;s&#8217; with the required number of 0&#8242;s For example, One &#8217;0&#8242; for 10MB , two for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How can a large file, say 1GB, for some testing purposes be created? </p>
<p><strong>Solution : </strong></p>
<p>Use the following command : </p>
<p>dd if=/dev/zero of= <em>filename</em> bs=1024 count=1024<em>number of 0&#8242;s</em></p>
<p>Replace &#8216;filename&#8217; with the actual filename.<br />
Replace &#8216;number of 0&#8242;s&#8217; with the required number of 0&#8242;s</p>
<p>For example,<br />
One &#8217;0&#8242; for 10MB , two for 100 MB and so on..</p>
<p>For the above scenario (file of size 1GB), use the following command : </p>
<blockquote><p>
dd if=/dev/zero of=file.test bs=1024 count=1024000</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-create-a-large-file-for-testing-purpose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find the number of user accounts via shell ?</title>
		<link>http://instacarma.com/blog/technical/how-to-find-the-number-of-user-accounts-via-shell/</link>
		<comments>http://instacarma.com/blog/technical/how-to-find-the-number-of-user-accounts-via-shell/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:37:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[account]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1163</guid>
		<description><![CDATA[Issue : There is no control panel installed on the server. So, how can the total number of user accounts on the system be determined? Solution: Use the following command to find the total number of accounts on the system : cat /etc/passwd &#124; wc -l Note : This will also include system accounts like [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>There is no control panel installed on the server. So, how can the total number of user accounts on the system be determined?<br />
<strong><br />
Solution: </strong></p>
<p>Use the following command to find the<strong> total number of accounts</strong> on the system : </p>
<blockquote><p>cat /etc/passwd | wc -l</p></blockquote>
<p>Note : This will also include system accounts like root, mail etc.</p>
<p>To <strong>list all the accounts</strong> on the system then use the following :</p>
<blockquote><p>cat /etc/passwd | cut -d&#8221;:&#8221; -f1</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-find-the-number-of-user-accounts-via-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling an email account</title>
		<link>http://instacarma.com/blog/technical/disabling-an-email-account/</link>
		<comments>http://instacarma.com/blog/technical/disabling-an-email-account/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 18:08:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1140</guid>
		<description><![CDATA[Issue : How can a particular email account be &#8216;disabled&#8217; temporarily. Note that the email account should not be &#8216;deleted&#8217; ? Is this possible at all via cPanel? Solution : There is no direct functionality in cPanel at the moment for this. This feature might be added at a later stage. However, you can achieve [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How can a particular email account be &#8216;disabled&#8217; temporarily. Note that the email account should not be &#8216;deleted&#8217; ? Is this possible at all via cPanel?</p>
<p><strong>Solution : </strong></p>
<p>There is no direct functionality in cPanel at the moment for this. This feature might be added at a later stage.<br />
However, you can achieve this functionality by modifying a few entries via SSH.</p>
<p>Comment out the entries related to the particular email account in the following locations:<br />
/home/user/etc/domainname/passwd<br />
/home/user/etc/domainname/shadow<br />
/home/user/etc/domainname/quota</p>
<p>Make sure that you just comment them and NOT delete them as you might need them back later.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/disabling-an-email-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to transfer a folder from one server to another</title>
		<link>http://instacarma.com/blog/technical/how-to-transfer-a-folder-from-one-server-to-another/</link>
		<comments>http://instacarma.com/blog/technical/how-to-transfer-a-folder-from-one-server-to-another/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:34:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[transfer]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1122</guid>
		<description><![CDATA[Issue : Need to transfer a folder from a remote server to the local server. Solution : One way of doing this is using the &#8216;wget&#8217; command. First, log in to your server via SSH and and launch wget mirroring using the following command : wget -m ftp://username:password@ftp.host/folder/ Do replace the above with the corresponding [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>Need to transfer a folder from a remote server to the local server.</p>
<p><strong>Solution : </strong></p>
<p>One way of doing this is using the &#8216;wget&#8217; command.</p>
<p>First, log in to your server via SSH and and launch wget mirroring using the following command :</p>
<blockquote><p>wget -m ftp://username:password@ftp.host/folder/</p></blockquote>
<p>Do replace the above with the corresponding values.</p>
<p>This will mirror the <em>folder</em> to your current directory location.</p>
<p>Finally, copy the downloaded files from the ftp.host/ directory to where you need them to be. </p>
<p>The main advantage of this method is that it is much more interactive and has many options.<br />
Use &#8216;wget &#8211;help&#8217; or &#8216;man wget&#8217; for more information on this.</p>
<p>Source :  WHT</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-transfer-a-folder-from-one-server-to-another/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to prevent SFTP users from viewing server files and folders</title>
		<link>http://instacarma.com/blog/technical/how-to-prevent-sftp-users-from-viewing-server-files-and-folders/</link>
		<comments>http://instacarma.com/blog/technical/how-to-prevent-sftp-users-from-viewing-server-files-and-folders/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 19:24:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1113</guid>
		<description><![CDATA[Issue : SFTP users can view server files and folders by simply changing the path to &#8216;/&#8217;. How can this be avoided? Solution : SFTP means FTP access over SSH. You will have to chroot the individual users in order to prevent them from viewing files outside their chroot jail. Normal FTP access has chroot [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>SFTP users can view server files and folders by simply changing the path to &#8216;/&#8217;. How can this be avoided?</p>
<p><strong>Solution : </strong></p>
<p>SFTP  means  FTP access over SSH.<br />
You will have to <em>chroot</em> the individual users in order to prevent them from viewing files outside their chroot jail.<br />
Normal FTP access has chroot isolation at the ftp daemon level.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-prevent-sftp-users-from-viewing-server-files-and-folders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to find files containing a specific word ?</title>
		<link>http://instacarma.com/blog/technical/how-to-find-files-containing-a-specific-word/</link>
		<comments>http://instacarma.com/blog/technical/how-to-find-files-containing-a-specific-word/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 17:57:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1073</guid>
		<description><![CDATA[Issue : How to find files containing a specific word and store the results in another text file ? Solution : Use the following command : grep -R word /directory/* > filename Use -iR instead of -R for case insensitive search. This approach will take some time depending on the size and number of files. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How to find files containing a specific word and store the results in another text file ?</p>
<p><strong>Solution : </strong></p>
<p>Use the following command : </p>
<blockquote><p>grep -R <em>word</em> /<em>directory</em>/* > <em>filename</em></p></blockquote>
<p>Use -iR instead of -R for case insensitive search.<br />
This approach will take some time depending on the size and number of files.</p>
<p>A faster method is to use the <em>locate</em> command. </p>
<p>First run the following command to create/update the search database:</p>
<blockquote><p>updatedb</p></blockquote>
<p>Then run the following command : </p>
<blockquote><p>locate <em>string</em> > results.txt</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-find-files-containing-a-specific-word/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to resolve multiple problems due to permission issues</title>
		<link>http://instacarma.com/blog/technical/how-to-resolve-multiple-problems-due-to-permission-issues/</link>
		<comments>http://instacarma.com/blog/technical/how-to-resolve-multiple-problems-due-to-permission-issues/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 17:23:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles and tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[ownership]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1019</guid>
		<description><![CDATA[Sometimes, permissions might get screwed server wide resulting in various problems for different users. Here are some steps to reset the permissions. /scripts/checkbsdgroups &#8212; Checks and repairs proftpd ownership on FreeBSD. /scripts/chownpublichtmls &#8212; Change ownership of all users web space to them, which is useful for converting to suexec. Files owned by nobody are deleted. [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, permissions might get screwed server wide resulting in various problems for different users.</p>
<p>Here are some steps to reset the permissions.</p>
<p><em>/scripts/checkbsdgroups</em> &#8212; Checks and repairs proftpd ownership on FreeBSD.<br />
<em>/scripts/chownpublichtmls</em> &#8212; Change ownership of all users web space to them, which is useful for converting to suexec. Files owned by nobody are deleted.</p>
<p>Then, login to WHM as &#8216;root&#8217; and go to Whm >> Resellers >> Reseller Center >> Reset Resellers</p>
<p>Select all Resellers under Reset package permissions to default and click  the reset button.</p>
<p>Assuming that you have an ACL with the default permissions,  select all Resellers under &#8216;Apply an ACL list to multiple resellers >> Select the appropriate ACL list >> Apply.</p>
<p>Also, it is advised to run the following : </p>
<p>/scripts/fixeverything/<br />
/scripts/upcp &#8211;force</p>
<p>service httpd restart<br />
service named restart</p>
<p>Also, refer to <a href="http://instacarma.com/blog/technical/changing-multiple-account-ownerships-via-ssh/">Changing multiple account ownerships via SSH</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-resolve-multiple-problems-due-to-permission-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing the default port for SSH</title>
		<link>http://instacarma.com/blog/technical/changing-the-default-port-for-ssh/</link>
		<comments>http://instacarma.com/blog/technical/changing-the-default-port-for-ssh/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 16:52:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1009</guid>
		<description><![CDATA[Issue : How to change the default port for SSH? Solution : Open the port (which you want to use for SSH) in the server firewall and restart the firewall to apply the change. Then, open the configuration file /etc/ssh/sshd_config using your favorite editor and change : #Port 22 to Port x Replace &#8216;x&#8217; with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How to change the default port for SSH?</p>
<p><strong>Solution : </strong></p>
<p>Open the port (which you want to use for SSH) in the server firewall and restart the firewall to apply the change.<br />
Then, open the configuration file <em>/etc/ssh/sshd_config</em> using your favorite editor and change :</p>
<p>#Port 22<br />
to<br />
Port x </p>
<p>Replace &#8216;x&#8217; with the required port number.</p>
<p>Restart sshd :</p>
<blockquote><p>/etc/init.d/sshd restart</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/changing-the-default-port-for-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing IPs for multiple accounts on a server</title>
		<link>http://instacarma.com/blog/technical/changing-ips-for-multiple-accounts-on-a-server/</link>
		<comments>http://instacarma.com/blog/technical/changing-ips-for-multiple-accounts-on-a-server/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 19:35:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=994</guid>
		<description><![CDATA[Issue : How to change the IPs of multiple accounts on a server in one go? The option in WHM is tedious. Hence, it does not serve the purpose. Solution : You need to have &#8216;root&#8217; SSH access in order to do this. Create a file and put the concerned accounts in it in the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How to change the IPs of multiple accounts on a server in one go? The option in WHM is tedious. Hence, it does not serve the purpose.</p>
<p><strong>Solution : </strong></p>
<p>You need to have &#8216;root&#8217; SSH access in order to do this.<br />
Create a file and put the concerned accounts in it  in the following format:</p>
<blockquote><p>domainname1: user1<br />
domainname2: user2<br />
and so on..</p></blockquote>
<p>Now execute the following command :</p>
<blockquote><p>for i in `cat /path/to/file | cut -d: -f1`<br />
do<br />
/usr/local/cpanel/bin/swapip OLDIP NEWIP $i;<br />
done;</p></blockquote>
<p>Replace OLDIP and NEWIP with the corresponding values.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/changing-ips-for-multiple-accounts-on-a-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pointing a sub-domain to folder outside public_html</title>
		<link>http://instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/</link>
		<comments>http://instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 16:35:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=987</guid>
		<description><![CDATA[Issue : When you create a sub-domain, cPanel points it to the corresponding folder under public_html by default. How to point it to a folder outside the public_html? Solution : This cannot be done via cPanel/WHM but can be achieved if you have &#8216;root&#8217; SSH access to the server. 1. Open the apache configuration file [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>When you create a sub-domain, cPanel points it to the corresponding folder under public_html by default. How to point it to a folder outside the public_html?</p>
<p><strong>Solution : </strong></p>
<p>This cannot be done via cPanel/WHM but can be achieved if you have &#8216;root&#8217; SSH access to the server.</p>
<p>1. Open the apache configuration file &#8212; <em>/usr/local/apache/conf/httpd</em>.conf<br />
2. Search for the virtual host entry for your sub-domain.<br />
3. Edit the document root of your sub-domain to match the desired location.<br />
4. Save and Exit. Restart apache.</p>
<p>Note : cPanel rebuilds httpd.conf from userdata files and its overwritten on every cPanel update, on every account creation, subdomain addition, or any such activity related to apache and any manual changes you make will be overwritten. To make permanent changes to a subdomain&#8217;s root folder :</p>
<p>1. Edit the file /<em>var/cpanel/userdata/username/subdomain.domain.com file</em>, change the path and save it.<br />
2. Run  <em>/scripts/rebuildhttpdconf</em><br />
3. Restart apache.</p>
<p>To learn how you can preserve the changes in httpd.conf during EasyApache, click <a href="http://instacarma.com/blog/technical/preserving-httpd-conf-during-easyapache/">here</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SSH connection drops on being idle</title>
		<link>http://instacarma.com/blog/technical/ssh-connection-drops-on-being-idle/</link>
		<comments>http://instacarma.com/blog/technical/ssh-connection-drops-on-being-idle/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 17:05:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=915</guid>
		<description><![CDATA[Issue : The SSH connection times out on few minutes of inactivity. Fix : Most likely, you are using SSH protocol 2 . To get around the above problem, you can simply increase the ClientAliveInterval in the file /etc/ssh/sshd_config to (say) 300 seconds.]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>The SSH connection times out on few minutes of inactivity.</p>
<p><strong>Fix : </strong></p>
<p>Most likely, you are using SSH protocol 2 .<br />
To get around the above problem, you can simply increase the <em>ClientAliveInterval</em> in the file <em>/etc/ssh/sshd_config</em> to (say) 300 seconds.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/ssh-connection-drops-on-being-idle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jailshell not allowing basic commands</title>
		<link>http://instacarma.com/blog/technical/jailshell-not-allowing-basic-commands/</link>
		<comments>http://instacarma.com/blog/technical/jailshell-not-allowing-basic-commands/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:21:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[virtfs]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=870</guid>
		<description><![CDATA[Issue : After allocating jailshell , the user is not able to use commands like &#8216;ls&#8217; , &#8216;touch&#8217; , &#8216;mkdir&#8217; etc. within his own home directory. Fix: Try the following steps : 1. Get into the directory /home/virtfs/username/home/ via SSH and check the ownership and permissions of the folder named username inside this directory. The [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong> </p>
<p>After allocating jailshell , the user is not able to use commands like &#8216;ls&#8217; , &#8216;touch&#8217; , &#8216;mkdir&#8217; etc. within his own home directory.</p>
<p><strong>Fix: </strong></p>
<p>Try the following steps : </p>
<p>1. Get into the directory <em>/home/virtfs/username/home/</em> via SSH and check the ownership and permissions of the folder named <em>username</em> inside this directory. The ownership should be <em>username.username</em> and permissions should be 711 .</p>
<p>2. If the above does not work then try un-mounting the entire <em>virtfs</em> directory and log back in to the SSH user:</p>
<blockquote><p>
root@server [~]# umount /home/virtfs/<user>/home/<user>/</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/jailshell-not-allowing-basic-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check who/when logged in via SSH</title>
		<link>http://instacarma.com/blog/technical/how-to-check-whowhen-logged-in-via-ssh/</link>
		<comments>http://instacarma.com/blog/technical/how-to-check-whowhen-logged-in-via-ssh/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:54:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=850</guid>
		<description><![CDATA[Issue : How to check successful and failed SSH logins to the server ? Solution : Use the following commands (as root) to achieve this : last &#124; less This captures data from /var/log/wtmp and shows you the successful logins. lastb &#124; less This captures data from /var/log/btmp and shows you the failed attempts. Source [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How to check successful and failed SSH logins to the server ?</p>
<p><strong>Solution : </strong></p>
<p>Use the following commands (as root) to achieve this : </p>
<blockquote><p>last | less</p></blockquote>
<p>This captures data from <em>/var/log/wtmp</em> and shows you the successful logins.</p>
<blockquote><p>
lastb | less</p></blockquote>
<p>This captures data from <em>/var/log/btmp</em> and shows you the failed attempts.</p>
<p>Source : WHT</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/how-to-check-whowhen-logged-in-via-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic backups using SSH</title>
		<link>http://instacarma.com/blog/technical/automatic-backups-using-ssh/</link>
		<comments>http://instacarma.com/blog/technical/automatic-backups-using-ssh/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 16:22:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=758</guid>
		<description><![CDATA[Issue : How to go about setting up backups using SSH so that backups of every account are uploaded automatically from server1 to server2 ? Solution : 1. Make SSH password less (key based) from destination to source. 2. Run a rsync from destination to get files from source. 3. Set it as a cron [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How to go about setting up backups using SSH so that backups of every account  are uploaded automatically  from server1 to server2 ?</p>
<p><strong>Solution : </strong></p>
<p>1. Make SSH password less (key based) from destination to source.</p>
<p>2. Run a <em>rsync</em> from destination to get files from source.</p>
<p>3. Set it as a cron every night according to the server load.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/automatic-backups-using-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SFTP without SSH</title>
		<link>http://instacarma.com/blog/technical/sftp-without-ssh/</link>
		<comments>http://instacarma.com/blog/technical/sftp-without-ssh/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 19:45:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=718</guid>
		<description><![CDATA[Issue : How to allow SFTP but disallow shell-level access ? Solution : To allow SFTP access but without shell access, you must first enable (jailed) shell via WHM. But then run the following so they do not have command line/shell access: usermod -s /usr/local/cpanel/bin/noshell username Of course, replace &#8220;username&#8221; with the actual account user [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue : </strong></p>
<p>How to allow SFTP but disallow shell-level access ?</p>
<p><strong>Solution : </strong></p>
<p>To allow SFTP access but without shell access, you must first enable (jailed) shell via WHM. But then run the following so they do not have command line/shell access:</p>
<blockquote><p>
usermod -s /usr/local/cpanel/bin/noshell username</p></blockquote>
<p>Of course, replace &#8220;username&#8221; with the actual account user name.</p>
<p>Then generate a key pair for the account in question:</p>
<blockquote><p>cd /home/userid/.ssh</p></blockquote>
<p>Run:<br />
ssh-keygen<br />
(Accept the default names, i.e. id_rsa)<br />
Enter any passphrase and be sure to remember the passphrase used.</p>
<p>After this two files will be created:</p>
<p>id_rsa<br />
***This is the private key.<br />
id_rsa.pub<br />
***This is the public key.</p>
<p>Now entering the following:</p>
<blockquote><p>cat id_rsa.pub >> authorized_keys</p></blockquote>
<p>The id_rsa file is the private key to be used with FileZilla:</p>
<p>Preferences &#8212;> SFTP &#8212;> add key file.</p>
<p>Then configure FileZilla with SFTP and port &#8211; (insert ssh access port here), the user ID but NO password.</p>
<p>Remove both files from the on-line account:<br />
id_rsa.pub<br />
id_rsa</p>
<p>Now SFTP transfers should work.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://instacarma.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://instacarma.com/blog/technical/sftp-without-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
