<?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>Everything is Crap &#187; sftp</title>
	<atom:link href="http://everythingiscrap.com/tag/sftp/feed/" rel="self" type="application/rss+xml" />
	<link>http://everythingiscrap.com</link>
	<description>Notes on the crap we&#039;ve been subjected to</description>
	<lastBuildDate>Wed, 11 Jan 2012 21:10:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Root privileges using SFTP in WinSCP</title>
		<link>http://everythingiscrap.com/root-privileges-using-sftp-in-winscp/</link>
		<comments>http://everythingiscrap.com/root-privileges-using-sftp-in-winscp/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 16:51:05 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[sftp]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[winscp]]></category>

		<guid isPermaLink="false">http://everythingiscrap.com/?p=213</guid>
		<description><![CDATA[My Ubuntu installation doesn't allow me to log in as root. But, it allows my user to escalate permissions and log in as root. I use WinSCP to transfer files from my Windows box to Ubuntu through SFTP. This works fine, except if I want to transfer files to a directory that requires root privileges. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://winscp.net/eng/index.php"><img class="alignnone size-full wp-image-215" title="WinSCP" src="http://everythingiscrap.com/wp-content/uploads/2010/01/winscp.gif" alt="" width="150" height="150" /></a></p>
<p><a href="http://winscp.net/eng/index.php"></a>My Ubuntu installation doesn't allow me to log in as root. But, it allows my user to escalate permissions and log in as root. I use <a href="http://winscp.net/eng/index.php">WinSCP</a> to transfer files from my Windows box to Ubuntu through SFTP. This works fine, except if I want to transfer files to a directory that requires root privileges. The solution involves changing WinSCP connection settings and allowing administrators to escalate sftp-server to root permissions without prompting for a password.</p>
<p>Long story short, it works.</p>
<p>First step is to edit /etc/sudoers on the Ubuntu side. Add the following line:</p>
<blockquote><p>%admin ALL=NOPASSWD: /usr/lib/openssh/sftp-server</p></blockquote>
<p>Then, edit WinSCP Configuration, Session Properties -&gt; SFTP -&gt; SFTP server. The value should be</p>
<blockquote><p>sudo /usr/lib/openssh/sftp-server</p></blockquote>
<p>Just what I needed. Believe it or not, the <a href="http://winscp.net/eng/docs/faq_su">WinSCP FAQ is where I learned how to use sudo in an SFTP session</a>. Go WinSCP!</p>
]]></content:encoded>
			<wfw:commentRss>http://everythingiscrap.com/root-privileges-using-sftp-in-winscp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

