<?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>KarkomaOnline &#187; Security</title>
	<atom:link href="http://www.karkomaonline.com/index.php/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karkomaonline.com</link>
	<description>a Blog for SysAdmins and Unix stuff in general</description>
	<lastBuildDate>Fri, 30 Jul 2010 17:38:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>10 years of OpenSSH</title>
		<link>http://www.karkomaonline.com/index.php/2009/10/10-years-of-openssh/</link>
		<comments>http://www.karkomaonline.com/index.php/2009/10/10-years-of-openssh/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:51:28 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=274</guid>
		<description><![CDATA[Thank you to everyone that has contributed to OpenSSH over its lifetime. It has made our life as Sysadmins a bit easier. The version 5.3 has been released and marks the 10th anniversary of this project. From OpenSSH: OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0 implementation and includes sftp client [...]]]></description>
			<content:encoded><![CDATA[<p>Thank you to everyone that has contributed to OpenSSH over its lifetime. It has made our life as Sysadmins a bit easier.</p>
<p>The version 5.3 has been released and marks the 10th anniversary of this project. From <a href="http://www.openssh.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openssh.org/?referer=');">OpenSSH</a>:</p>
<blockquote><p>OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0 implementation and includes sftp client and server support.</p>
<p>This release marks the 10th anniversary of the OpenSSH project. We would like to thank the OpenSSH community for their support, especially those who will continue to contribute code or patches, report bugs, test snapshots or donate to the project during the next 10 years.  More information on donations may be found at:</p>
<p>http://www.openssh.com/donations.html</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2009/10/10-years-of-openssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSH: simplifying logins</title>
		<link>http://www.karkomaonline.com/index.php/2007/12/openssh-simplifying-logins/</link>
		<comments>http://www.karkomaonline.com/index.php/2007/12/openssh-simplifying-logins/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 04:21:09 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[OpenSSH]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/index.php/2007/12/06/openssh-simplifying-logins/</guid>
		<description><![CDATA[OpenSSH provides a per-user configuration file usually located in ~/.ssh/config. This file can help ease your life as Sysadmin. Let&#8217;s say that you frequently connect to a server in this way: ssh admin@boring-servername.boring-domain.com With OpenSSH there is an easy way to do the job. Edit or create a config file: vi ~/.ssh/config and then add [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openbsd.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/?referer=');">OpenSSH</a> provides a per-user configuration file usually located in ~/.ssh/config. This file can help ease your life as Sysadmin. Let&#8217;s say that you frequently connect to a server in this way:</p>
<blockquote><p>ssh admin@boring-servername.boring-domain.com</p></blockquote>
<p>With OpenSSH there is an easy way to do the job. Edit or create a <em>config</em> file:</p>
<blockquote><p>vi ~/.ssh/config</p></blockquote>
<p>and then add the following:</p>
<blockquote><p> Host servername<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User admin<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HostName boring-servername.boring-domain.com</p></blockquote>
<p>Where Host is the alias for the remote server you want to connect to, HostName is the full name of the remote server and User is the login name.</p>
<p><strong>References</strong>:</p>
<ul>
<li>man <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&amp;referer=');">ssh_config </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2007/12/openssh-simplifying-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS recursion and DDOS</title>
		<link>http://www.karkomaonline.com/index.php/2006/03/dns-recursion-and-ddos/</link>
		<comments>http://www.karkomaonline.com/index.php/2006/03/dns-recursion-and-ddos/#comments</comments>
		<pubDate>Wed, 22 Mar 2006 00:44:54 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2006/03/22/dns-recursion-and-ddos/</guid>
		<description><![CDATA[According to security news, it seems that Sysadmins are becoming more and more concerned about poorly configured DNS servers, specially when recent reports show an increase of distributed denial of service attacks targeted to recursive DNS servers. Next I&#8217;ll show you some very basic tips to protect your machines against this kind of attacks. As [...]]]></description>
			<content:encoded><![CDATA[<p>According to security news, it seems that Sysadmins are becoming more and more concerned about poorly configured DNS servers, specially when recent reports show an increase of distributed denial of service attacks targeted to recursive DNS servers. Next I&#8217;ll show you some very basic tips to protect your machines against this kind of attacks.</p>
<p>As you probably know, a recursive DNS server (a caching DNS) tells clients the answers to queries for various DNS records. Queries not resolvable directly (non-local records) are forwarded to servers that can resolve them. Once it get answers they are stored in its cache for future use (note that this data is not cached forever).</p>
<p>On the other hand, a DNS server only shows to the world DNS records for a specific domain and is known to be authoritative for that domain.</p>
<p>Nowadays everybody with some security skills seems to agree in the importance of separating DNS caches from DNS servers. Even Bind (the most widely used DNS implementation) seems to follow this recommendation.</p>
<p>The easiest way to limit recursion in Bind9 is to put something like this in your config file:</p>
<blockquote><p>options { allow-query { any; }; allow-recursion { 192.168.1.0/24; localhost; };</p></blockquote>
<p>This will allow recursion from your internal net and from localhost. A better solution&#8230; SWITCH TO DJBDNS!!</p>
<p>And now some interesting links:</p>
<ul>
<li><a href="http://cr.yp.to/djbdns/separation.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/cr.yp.to/djbdns/separation.html?referer=');">Notes from DjbDNS site</a></li>
<li><a href="http://cr.yp.to/djbdns.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/cr.yp.to/djbdns.html?referer=');">DjbDNS site</a></li>
<li><a href="http://www.us-cert.gov/reading_room/DNS-recursion121605.pdf" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.us-cert.gov/reading_room/DNS-recursion121605.pdf?referer=');">Threats posed by DNS recursion</a></li>
<li>If you <a href="http://www.oreilly.com/catalog/dns3/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.oreilly.com/catalog/dns3/?referer=');">insist</a> in using Bind</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2006/03/dns-recursion-and-ddos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encrypting files with OpenSSL</title>
		<link>http://www.karkomaonline.com/index.php/2005/08/encrypting-files-with-openssl/</link>
		<comments>http://www.karkomaonline.com/index.php/2005/08/encrypting-files-with-openssl/#comments</comments>
		<pubDate>Tue, 16 Aug 2005 08:21:21 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2005/08/16/encrypting-files-with-openssl/</guid>
		<description><![CDATA[The OpenSSL Project is an Open Source implementation of the Secure Sockets Layer and Transport Layer Security protocols as well as a cryptography library. In this tip I will show you how to encrypt an individual file using the openssl tool. Probably GPG is a better choice for simple file encryption, but in some ocassions [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.openssl.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openssl.org/?referer=');">OpenSSL</a> Project is an Open Source implementation of the Secure Sockets Layer and Transport Layer Security protocols as well as a cryptography library. In this tip I will show you how to encrypt an individual file using the <em>openssl</em> tool.</p>
<p>Probably GPG is a better choice for simple file encryption, but in some ocassions (i.e. encrypt without building keys or certificates) OpenSSL could be very useful. It&#8217;s very simple:</p>
<blockquote><p>openssl enc -aes-256-cbc -salt -in SuperSecretFile.txt -out SuperSecretFile.txt.enc</p></blockquote>
<p>And your are done! Now to decrypt the file:</p>
<blockquote><p>openssl enc -d -aes-256-cbc -in SuperSecretFile.txt.enc -out SuperSecretFile.txt</p></blockquote>
<p>A note from the man pages.</p>
<p><code>use a salt in the key derivation routines. This option should *ALWAYS* be used unless compatibility with previous versions of OpenSSL or SSLeay is required. This option is only present on OpenSSL versions 0.9.5 or above.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2005/08/encrypting-files-with-openssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ports used by trojans and viruses</title>
		<link>http://www.karkomaonline.com/index.php/2004/09/ports-used-by-trojans-and-viruses/</link>
		<comments>http://www.karkomaonline.com/index.php/2004/09/ports-used-by-trojans-and-viruses/#comments</comments>
		<pubDate>Thu, 23 Sep 2004 10:05:54 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2004/09/23/ports-used-by-trojans-and-viruses/</guid>
		<description><![CDATA[Here goes a list of useful links to ports used by trojans and viruses&#8230; Linux firewall and security site This is from ISC Doshelp From Network ICE More on trojans and ports they like Simovits consulting If you are aware of new links, post a comment please.]]></description>
			<content:encoded><![CDATA[<p>Here goes a list of useful links to ports used by trojans and viruses&#8230;</p>
<ul>
<li><a href="http://www.linux-firewall-tools.com/linux/ports.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.linux-firewall-tools.com/linux/ports.html?referer=');">Linux firewall and security site</a></li>
<li>This is <a href="http://isc.sans.org/index.php" target="_blank" onclick="pageTracker._trackPageview('/outgoing/isc.sans.org/index.php?referer=');">from ISC</a></li>
<li><a href="http://www.doshelp.com/trojanports.htm" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.doshelp.com/trojanports.htm?referer=');">Doshelp</a></li>
<li>From <a href="http://www.iss.net/security_center/advice/Exploits/Ports/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.iss.net/security_center/advice/Exploits/Ports/?referer=');">Network ICE</a></li>
<li>More on <a href="http://lists.gpick.com/portlist/portlist.htm" target="_blank" onclick="pageTracker._trackPageview('/outgoing/lists.gpick.com/portlist/portlist.htm?referer=');">trojans and ports</a> they like</li>
<li><a href="http://www.simovits.com/nyheter9902.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.simovits.com/nyheter9902.html?referer=');">Simovits</a> consulting</li>
</ul>
<p>If you are aware of new links, post a comment please.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2004/09/ports-used-by-trojans-and-viruses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory allocation DOS</title>
		<link>http://www.karkomaonline.com/index.php/2004/07/memory-allocation-dos/</link>
		<comments>http://www.karkomaonline.com/index.php/2004/07/memory-allocation-dos/#comments</comments>
		<pubDate>Tue, 13 Jul 2004 05:14:00 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2004/07/12/memory-allocation-dos/</guid>
		<description><![CDATA[A bug in Apache 2.0.49 may allow a remote attacker to perform a Denial of Service attack by exhausting memory. It seems that 1.3.x releases are safe. For more information: Georgi Guninski security advisory #70, 2004 Gentoo GLSA 200407-03 / Apache Apache 2.0 Security Vulnerabilities]]></description>
			<content:encoded><![CDATA[<p>A bug in Apache 2.0.49 may allow a remote attacker to perform a Denial of Service attack by exhausting memory. It seems that 1.3.x releases are safe.</p>
<p>For more information:</p>
<ul>
<li><a href="http://www.guninski.com/httpd1.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.guninski.com/httpd1.html?referer=');">Georgi Guninski security advisory #70, 2004</a></li>
<li><a href="http://www.gentoo.org/security/en/glsa/glsa-200407-03.xml" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.gentoo.org/security/en/glsa/glsa-200407-03.xml?referer=');">Gentoo GLSA 200407-03 / Apache</a></li>
<li><a href="http://www.apacheweek.com/features/security-20" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.apacheweek.com/features/security-20?referer=');">Apache 2.0 Security Vulnerabilities</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2004/07/memory-allocation-dos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSH: port forwarding during active sessions</title>
		<link>http://www.karkomaonline.com/index.php/2004/06/openssh-port-forwarding-during-active-sessions/</link>
		<comments>http://www.karkomaonline.com/index.php/2004/06/openssh-port-forwarding-during-active-sessions/#comments</comments>
		<pubDate>Tue, 08 Jun 2004 19:11:44 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2004/06/08/openssh-port-forwarding-during-active-sessions/</guid>
		<description><![CDATA[Imagine you are logged into a remote system and want to forward a local port to the remote system without logging out and logging in again. This little trick will tell you how to do this. According to OpenSSH man pages: Escape Characters When a pseudo terminal has been requested, ssh supports a number of [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine you are logged into a remote system and want to forward a local port to the remote system without logging out and logging in again. This little trick will tell you how to do this.</p>
<p>According to <a href="http://www.openssh.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openssh.org/?referer=');">OpenSSH</a> man pages:</p>
<p><code>Escape Characters<br />
When a pseudo terminal has been requested, ssh supports a number of<br />
functions through the use of an escape character.<br />
....</code></p>
<p><code>The supported escapes (assuming the default `~') are:<br />
.....</code></p>
<p><code>~C      Open command line (only useful for adding port forwardings using<br />
the -L and -R options)</code></p>
<p><code>.....</code></p>
<p>So, to add a local forward after logging into the remote system procede as follows:</p>
<blockquote><p>ssh user@remote_host</p></blockquote>
<p>Once logged in&#8230;</p>
<blockquote><p>CR~C</p></blockquote>
<p>Hit carriage return then ~ and the C and you&#8217;ll get a prompt where you could type something like this:</p>
<blockquote><p>ssh&gt; -L 8022:127.0.0.1:22<br />
Forwarding port</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2004/06/openssh-port-forwarding-during-active-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux kernel vulnerability</title>
		<link>http://www.karkomaonline.com/index.php/2004/04/linux-kernel-vulnerability/</link>
		<comments>http://www.karkomaonline.com/index.php/2004/04/linux-kernel-vulnerability/#comments</comments>
		<pubDate>Sun, 25 Apr 2004 21:31:28 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2004/04/25/linux-kernel-vulnerability/</guid>
		<description><![CDATA[According to NetSecurity &#8230; The ip_setsockopt() function code is a subroutine of the setsockopt(2) system call. This function allows manipulation of various options of the IP socket. The MCAST_MSFILTER option can be used to provide the kernel with a list of multicast addresses to be received on the socket. This code has been introduced with [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.net-security.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.net-security.org/?referer=');">NetSecurity</a> &#8230;</p>
<p><code>The ip_setsockopt()  function  code is a subroutine of the setsockopt(2) system call.  This function  allows  manipulation of various  options of the IP socket. The  MCAST_MSFILTER  option  can be used to  provide  the kernel with a list of multicast  addresses to be received on the socket. This code has been introduced with the 2.4.22/2.6.1 kernel releases. Proper  exploitation  of  this  vulnerability  leads to local  privilege escalation  giving an attacker full super-user privileges.  Unsuccesfull exploitation  of  the  vulnerability  may  lead to  a  denial-of-service attack causing machine crash or instant reboot.</code></p>
<p>This bug has been fixed in the 2.4.26 and 2.6.4 kernel releases.</p>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://www.net-security.org/vuln.php?id=3405" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.net-security.org/vuln.php?id=3405&amp;referer=');">NetSecurity</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2004/04/linux-kernel-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache as an open proxy?</title>
		<link>http://www.karkomaonline.com/index.php/2004/04/apache-as-an-open-proxy/</link>
		<comments>http://www.karkomaonline.com/index.php/2004/04/apache-as-an-open-proxy/#comments</comments>
		<pubDate>Sun, 25 Apr 2004 19:41:09 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2004/04/25/apache-as-an-open-proxy/</guid>
		<description><![CDATA[If you have seen entries in your access.log file like this one&#8230; a.b.c.d &#8211; - [24/Apr/2004:23:00:00 +0200] &#8220;GET http://www.google.com/&#8221; 200 46124 This means that a.b.c.d is trying to access www.google.com using your Apache as a proxy. As you can see the response status 200 indicates success and the data returned is 46124 bytes long. If [...]]]></description>
			<content:encoded><![CDATA[<p>If you have seen entries in your <em>access.log</em> file like this one&#8230;</p>
<blockquote><p>a.b.c.d &#8211; - [24/Apr/2004:23:00:00 +0200] &#8220;GET http://www.google.com/&#8221; 200 46124</p></blockquote>
<p>This means that <em>a.b.c.d</em> is trying to access <em>www.google.com</em> using your Apache as a proxy. As you can see the response status 200 indicates success and the data returned is 46124 bytes long.</p>
<p>If you don&#8217;t want your server to be used as a forward proxy make sure that <em>ProxyRequests</em> directive is set to <em>Off</em>, even better do not load <em>mod_proxy</em> module.</p>
<p>Despite the fact the entry shown in the previous example says that the request succeded, this is not necessarily true. Try the following to test your server:</p>
<blockquote><p>telnet www.yoursite.com 80<br />
GET http://www.google.com/</p></blockquote>
<p>Watch the access.log file. If you see the code status 200, compare the bytes returned by Apache (the last field in the log entry) with your homepage size (your index.html). If they match, Apache is serving your homepage instead of forwarding the request to google. If they don&#8217;t, probably your Apache is an open forwarding proxy.</p>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://httpd.apache.org/docs/misc/FAQ.html#proxyscan" target="_blank" onclick="pageTracker._trackPageview('/outgoing/httpd.apache.org/docs/misc/FAQ.html_proxyscan?referer=');">Apache FAQ</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2004/04/apache-as-an-open-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editing remote files with OpenSSH</title>
		<link>http://www.karkomaonline.com/index.php/2004/04/editing-remote-files-with-openssh/</link>
		<comments>http://www.karkomaonline.com/index.php/2004/04/editing-remote-files-with-openssh/#comments</comments>
		<pubDate>Sun, 18 Apr 2004 21:04:50 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.karkoma.info/index.php/2004/04/18/editing-remote-files-with-openssh/</guid>
		<description><![CDATA[As you know, the main feature of OpenSSH is to establish secure connections to remote machines, so you get interactive sessions against them. However, OpenSSH also allows you to execute commands on remote machines. You can execute commands and have the output returned to the screen without logging in to the remote machine. To execute [...]]]></description>
			<content:encoded><![CDATA[<p>As you know, the main feature of <a href="http://www.openssh.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openssh.org/?referer=');">OpenSSH</a> is to establish secure connections to remote machines, so you get interactive sessions against them. However, OpenSSH also allows you to execute commands on remote machines. You can execute commands and have the output returned to the screen without logging in to the remote machine.</p>
<p>To execute a command remotely simply type:</p>
<blockquote><p>ssh user@remote_host &#8216;ls -al /etc&#8217;</p></blockquote>
<p>However, some commands require a terminal to run properly. For example, if you want to edit a remote file using <em>vi</em> you probably will try something like this:</p>
<blockquote><p>ssh user@remote_host &#8216;vi /etc/passwd&#8217;</p></blockquote>
<p>And you&#8217;ll get warnings like this:</p>
<blockquote><p> Vim: Warning: Output is not to a terminal<br />
Vim: Warning: Input is not from a terminal</p></blockquote>
<p>To avoid such warnings and cleanly edit your remote files type the following:</p>
<blockquote><p>ssh -t user@remote_host &#8216;vi /etc/passwd&#8217;</p></blockquote>
<p>The <em>-t</em> option will&#8230; (from OpenSSH man pages)</p>
<p><code>Force pseudo-tty allocation.  This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g., when implementing menu services.  Multiple -t options force tty allocation, even if ssh has no local tty.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2004/04/editing-remote-files-with-openssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
