<?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>Pario TechnoBlob &#187; sftp</title>
	<atom:link href="http://pario.no/tag/sftp/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 26 Apr 2012 08:18:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Manual download and install of VMware Tools in linux</title>
		<link>http://pario.no/2012/04/26/manual-download-and-install-of-vmware-tools-in-linux/</link>
		<comments>http://pario.no/2012/04/26/manual-download-and-install-of-vmware-tools-in-linux/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 06:41:54 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[esxi5]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[VMware Tools]]></category>
		<category><![CDATA[vSphere Client]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1724</guid>
		<description><![CDATA[This post describes how you can download and install the latest version of VMware Tools to a linux guest from a ESXi 5.0 host. You need SSH access rights to a VMware host to follow this guide. Allow SSH access to the VMware host you are about to access. This can be done in the [...]]]></description>
			<content:encoded><![CDATA[<p>This post describes how you can download and install the latest version of VMware Tools to a linux guest from a ESXi 5.0 host. You need SSH access rights to a VMware host to follow this guide.</p>
<ol>
<li>Allow SSH access to the VMware host you are about to access.
<ul>
<li>This can be done in the vSphere Client: Choose the VMware host you would like to access.</li>
<li>Go to the Configuration tab and select Security Profile under Software. Edit Services Properties and start the SSH daemon.</li>
<li>Verify that the firewall allows SSH traffic</li>
</ul>
</li>
<li>All the VMware Tools are located in the /vmimages/tools-isoimages/ folder on the host. Download the ISO-image with the tools you need
<ul>
<li>Issue this command from a machine that has access to the VMware host.
<pre> sftp username@vmhost.tld:/vmimages/tools-isoimages/linux.iso</pre>
<p>Type in your password and the download will start</li>
</ul>
</li>
<li>Mount the ISO-file and copy the VMware Tools installer file to the desired VMware linux guest using SSH
<ul>
<li>
<pre># mount linux.iso /media/cdrom/ -t iso9660 -o loop
# scp /media/cdrom/VMwareTools-8.6.5-652272.tar.gz username@vmguest.tld:</pre>
</li>
</ul>
</li>
<li>Manual install of VMware Tools on a vmguest as a privileged user
<ul>
<li>
<pre># tar xfz VMwareTools-8.6.5-652272.tar.gz
# cd vmware-tools-distrib
# ./vmware-install.pl</pre>
<p>Follow the instructions and finish the installer. A reboot may be required to load the necessary kernel modules.</li>
</ul>
</li>
</ol>
<p>Your VMware Tools are now installed and should work as it would on a normal VMware Tools installation.</p>
<p>This procedure can also be used on other operating systems. This is a list of all the VMware Tools ISO-images available in the /vmimages/tools-isoimages/ folder on a ESXi 5.0 host</p>
<pre>sftp&gt; ls -l
-rwx------    1 root     root     12576768 Apr 13 09:17 darwin.iso
-rwx------    1 root     root          256 Apr 13 09:17 darwin.iso.sig
-rwx------    1 root     root     16021504 Apr 13 09:16 freebsd.iso
-rwx------    1 root     root          256 Apr 13 09:18 freebsd.iso.sig
-rwx------    1 root     root     65200128 Apr 13 09:15 linux.iso
-rwx------    1 root     root          256 Apr 13 09:17 linux.iso.sig
-rwx------    1 root     root         1738 Apr 13 09:17 linux_avr_manifest.txt
-rwx------    1 root     root       540672 Apr 13 09:17 netware.iso
-rwx------    1 root     root          256 Apr 13 09:16 netware.iso.sig
-rwx------    1 root     root     13006848 Apr 13 09:17 solaris.iso
-rwx------    1 root     root          256 Apr 13 09:16 solaris.iso.sig
-rwx------    1 root     root          451 Apr 13 09:17 tools-key.pub
-rwx------    1 root     root     13664256 Apr 13 09:18 winPre2k.iso
-rwx------    1 root     root          256 Apr 13 09:17 winPre2k.iso.sig
-rwx------    1 root     root           49 Apr 13 09:18 winPre2k_avr_manifest.txt
-rwx------    1 root     root     62128128 Apr 13 09:17 windows.iso
-rwx------    1 root     root          256 Apr 13 09:18 windows.iso.sig
-rwx------    1 root     root         1069 Apr 13 09:17 windows_avr_manifest.txt</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTIvMDQvMjYvbWFudWFsLWRvd25sb2FkLWFuZC1pbnN0YWxsLW9mLXZtd2FyZS10b29scy1pbi1saW51eC88d3B0Yj5NYW51YWwgZG93bmxvYWQgYW5kIGluc3RhbGwgb2YgVk13YXJlIFRvb2xzIGluIGxpbnV4PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2012/04/26/manual-download-and-install-of-vmware-tools-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo use lftp as a sftp client</title>
		<link>http://pario.no/2009/06/23/howto-use-lftp-as-a-sftp-client/</link>
		<comments>http://pario.no/2009/06/23/howto-use-lftp-as-a-sftp-client/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:30:14 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[lftp]]></category>
		<category><![CDATA[sftp]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1153</guid>
		<description><![CDATA[lftp is a file transfer program that allows sophisticated ftp, http and other connections to other hosts. If site is specified then lftp will connect to that site otherwise a connection has to be established with the open command. Basic usage lftp sftp://[domain name] lftp sftp://example.com Use a different user name than the one you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>lftp</strong>  is  a file transfer program that allows sophisticated ftp, http and other connections to other hosts. If site is specified then <strong>lftp</strong> will connect to that site otherwise a connection has to be established with the open command.</p>
<p><strong>Basic usage</strong></p>
<ul>
<li>lftp sftp://[domain name]</li>
<li>lftp sftp://example.com</li>
</ul>
<p><strong>Use a different user name than the one you are currently using</strong></p>
<ul>
<li>lftp sftp://[user name]@[domain name]</li>
<li>lftp sftp://username@example.com</li>
</ul>
<p><strong>Use a different port and different user name</strong></p>
<ul>
<li>lftp sftp://[user name]@[domain name]:[port number]</li>
<li>lftp sftp://userName@example.com:2222</li>
</ul>
<p><strong>Recursive download/upload</strong></p>
<pre>lftp> mirror directory_to_download
lftp> mirror -R directory_to_upload</pre>
<p>For more lftp options type the following command in a console window</p>
<pre>
# man lftp</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDkvMDYvMjMvaG93dG8tdXNlLWxmdHAtYXMtYS1zZnRwLWNsaWVudC88d3B0Yj5Ib3dUbyB1c2UgbGZ0cCBhcyBhIHNmdHAgY2xpZW50PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2009/06/23/howto-use-lftp-as-a-sftp-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cold backup for the Open Source Edition of Zimbra</title>
		<link>http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/</link>
		<comments>http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 22:56:31 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[tar.]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/</guid>
		<description><![CDATA[Today I&#8217;ve setup a cold backup routine to backup my Zimba installation running on my Debian (Etch) 4.0 server that is in full production now for my private domains. This is a slightly modified backup script for the Open Source Edition of Zimbra from the Zimbra Wiki. Please note that the script does a full [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve setup a cold backup routine to backup my Zimba installation running on my Debian (Etch) 4.0 server that is in full production now for my private domains. This is a slightly modified backup script for the Open Source Edition of Zimbra from the <a href="http://wiki.zimbra.com/index.php?title=Open_Source_Edition_Backup_Procedure#A_Simple_Shell_Script_Method">Zimbra Wiki</a>. Please note that the script does a full backup every time it&#8217;s being run!</p>
<pre>
#!/bin/bash

# Zimbra Backup Script
# Requires sftp to run
# This script is intended to run from the crontab as root
# Free to use and free of any warranty!  Daniel W. Martin, 9 Sept 2007

# Live sync before stopping Zimbra to minimize sync time with the services down
# Comment out the following line if you want to try single cold-sync only
rsync -avHK --delete /opt/zimbra/ /backup/zimbra

# which is the same as: /opt/zimbra /backup
# Including --delete option gets rid of files in the dest folder that don't exist at the src
# this prevents logfile/extraneous bloat from building up overtime.

# Stop Zimbra Services
sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
sleep 40

# Sync to backup directory
rsync -avHK --delete /opt/zimbra/ /backup/zimbra

# Restart Zimbra Services
sudo -u zimbra /opt/zimbra/bin/zmcontrol start

# Create a txt file in the backup directory that'll contain the current Zimbra
# server version. Handy for knowing what version of Zimbra a backup can be restored to.
sudo -u zimbra zmcontrol -v &gt; /backup/zimbra/conf/zimbra_version.txt
# or examine your /opt/zimbra/.install_history

# Create archive of backed-up directory for offsite transfer
# cd /backup/zimbra
ZimbraVersion=zimbraBackup-zcs-5.0.1_GA_1902.DEBIAN4.0.20080109200914

tar -zcf /backup/$ZimbraVersion-$(date +"%Y-%m-%d").tgz -C /backup/zimbra .

# Transfer file to backup server using passwordless sftp
scp zimbraBackup-zcs-5.0.1_GA_1902.DEBIAN4.0.20080109200914-$(date +"%Y-%m-%d").tgz username@example.com:/path/to/backupfolder/</pre>
<p>I&#8217;ve described <a href="http://pario.no/2008/01/09/ssh-without-a-password/">passwordless ssh/sftp session</a> in a earlier post so I won&#8217;t describe the last line of the backup script.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/wiki.zimbra.com\/index.php?title=Open_Source_Edition_Backup_Procedure#A_Simple_Shell_Script_Method"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMDEvY29sZC1iYWNrdXAtZm9yLXRoZS1vcGVuLXNvdXJjZS1lZGl0aW9uLW9mLXppbWJyYS88d3B0Yj5Db2xkIGJhY2t1cCBmb3IgdGhlIE9wZW4gU291cmNlIEVkaXRpb24gb2YgWmltYnJhPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/01/cold-backup-for-the-open-source-edition-of-zimbra/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SFTP in batch mode</title>
		<link>http://pario.no/2008/01/09/sftp-in-batch-mode/</link>
		<comments>http://pario.no/2008/01/09/sftp-in-batch-mode/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 15:03:13 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://pario.no/2008/01/09/sftp-in-batch-mode/</guid>
		<description><![CDATA[This post describes how you use sftp in batch mode. If you don&#8217;t want to type in your password read my SSH without a password post. Create a file named myCommands.sftp that contains the commands you want to run. My file looks like this # Change to your desired directory locally lcd /data/Hattori # Change [...]]]></description>
			<content:encoded><![CDATA[<p>This post describes how you use <strong>sftp</strong> in batch mode. If you don&#8217;t want to type in your password read my <a href="http://pario.no/2008/01/09/ssh-without-a-password/">SSH without a password post</a>.</p>
<p>Create a file named myCommands.sftp that contains the commands you want to run. My file looks like this</p>
<pre>
# Change to your desired directory locally
lcd /data/Hattori
# Change to the desired directory on the remote server
cd /backup
# Transfer all remote files locally
get *
# We're done with this session
bye</pre>
<p>Next you run the sftp session</p>
<pre>
sftp -b myCommands.sftp example.com</pre>
<p>That should be all that is necessary to download your files from the remote server.</p>
<p>This example could easily have been extended with a crontab entry.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDEvMDkvc2Z0cC1pbi1iYXRjaC1tb2RlLzx3cHRiPlNGVFAgaW4gYmF0Y2ggbW9kZTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/01/09/sftp-in-batch-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deny SSH- but allow SFTP access</title>
		<link>http://pario.no/2007/11/28/deny-ssh-but-allow-sftp-access/</link>
		<comments>http://pario.no/2007/11/28/deny-ssh-but-allow-sftp-access/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 23:31:22 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/28/deny-ssh-but-allow-sftp-access/</guid>
		<description><![CDATA[This is an alternative way of limiting the SSH access to only SFTP explained in my How to restrict users to SFTP only instead of SSH post. Edit your /etc/sshd_config file and change your settings like this Match User username AllowTcpForwarding no X11Forwarding no ForceCommand /usr/libexec/sftp-server -l INFO Replace username with the user name you [...]]]></description>
			<content:encoded><![CDATA[<p>This is an alternative way of limiting the SSH access to only SFTP explained in my <a href="http://pario.no/2007/04/30/how-to-restrict-users-to-sftp-only-instead-of-ssh/">How to restrict users to SFTP only instead of SSH</a> post.</p>
<p>Edit your <strong>/etc/sshd_config</strong> file and change your settings like this<br />
<code><br />
Match User username<br />
AllowTcpForwarding no<br />
X11Forwarding no<br />
ForceCommand /usr/libexec/sftp-server -l INFO </code></p>
<p>Replace username with the user name you would limit the SSH access for.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMjgvZGVueS1zc2gtYnV0LWFsbG93LXNmdHAtYWNjZXNzLzx3cHRiPkRlbnkgU1NILSBidXQgYWxsb3cgU0ZUUCBhY2Nlc3M8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/28/deny-ssh-but-allow-sftp-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

