<?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>OpenBSD and FreeBSD resources &#187; SSH</title>
	<atom:link href="http://purebsd.com/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://purebsd.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jun 2010 06:01:11 +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>SSH &#8211; The Secure SHell</title>
		<link>http://purebsd.com/ssh-the-secure-shell.html</link>
		<comments>http://purebsd.com/ssh-the-secure-shell.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:29:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=52</guid>
		<description><![CDATA[The SSH protocol was developed to solve the issue of insecure remote logins with programs like telnet, rsh and rlogin. OpenSSH, developed by the OpenBSD team, and all other SSH implementations make use of encryption to transmit data over the internet and intranet. Sniffing passwords and sensitive data becomes much harder for parties interested in [...]]]></description>
			<content:encoded><![CDATA[<p>The SSH protocol was developed to solve the issue of insecure remote logins with programs like telnet, rsh and rlogin. OpenSSH, developed by the OpenBSD team, and all other SSH implementations make use of encryption to transmit data over the internet and intranet.<br />
Sniffing passwords and sensitive data becomes much harder for parties interested in your transmissions.</p>
<p><strong>SSH client</strong></p>
<p>The SSH client, <code>/usr/bin/ssh</code> on OpenBSD systems, is used to login on a remote host or directly execute a program remotely.<br />
Login to remote host:</p>
<p><code>ssh -l username remote-host.example.org</code><br />
<code>ssh username@remote-host.example.org</code></p>
<p>If your username is the same on the remote end as it is where you execute the SSH client, providing a username is not necessary.</p>
<p>At the time of your first login attempt you&#8217;re asked by your own SSH client if you&#8217;d like to accept the public key of the remote host. Enter &#8220;yes&#8221; if you verified the authenticity of that key. That public key of the remote host is then saved to <code>~/.ssh/known_hosts</code>.<br />
That key is checked with the offered public key each time you&#8217;re connection again to this remote host. When the offered key differs from the one previously stored, your SSH client will alert you about it and terminates the connection process.<br />
This way, accidentally logging in to a host pretending to be the host you&#8217;d like to connect with, can be prevented.<br />
If you see such a warning from your SSH client, verify with your sysadmin if that new key is a valid/authentical public key of the host. There are valid reasons for hosts having a new public key.</p>
<p><strong>scp: secure copy</strong></p>
<p><code>scp</code> is used to copy files securely to a remote host. Its syntax is not that different from <code>cp</code> or<code>rcp</code>. I think it&#8217;s best to just provide some examples of its usage.</p>
<p>Copying files from the current host to remote host:</p>
<p><code>scp onefile.tgz username@remote-host.example.org:adirectory</code><br />
<code>scp *.tgz username@remote-host.example.org:/tmp/adirectory</code><br />
<code>scp -r /tmp/backup username@remote-host.example.org:/tmp/adirectory</code></p>
<p>Copying files from remote host to this host:</p>
<p><code>scp 'username@remote-host.example.org:myfiles/onefile.tgz' .</code><br />
<code>scp 'username@remote-host.example.org:myfiles/*.tgz' .</code><br />
<code>scp -r 'username@remote-host.example.org:myfiles' /tmp/backup</code></p>
<p><strong>sftp: secure ftp</strong></p>
<p><code>sftp</code> is best compared and used as a rather lite edition of a standard text-mode ftp client. As far as I can see it only differs from FTP in that it&#8217;s using encryption to transmit data and if I&#8217;m not mistaken, all communication between client and server goes through port 22.</p>
<p><strong>SSH daemon</strong></p>
<p>The SSH daemon is the program that accepts and handles the incoming SSH connections. It is run by default on OpenBSD systems and configured pretty secure. The only thing I changed was the option that allows remote logins to root, since I&#8217;m rather paranoid (:<br />
To turn off the allowance of remote root logins, edit <code>/etc/sshd_config</code> and change the<code>PermitRootLogin</code> to <code>no</code>:</p>
<p><code>PermitRootLogin no</code></p>
<p><strong>sftp-server</strong></p>
<p>The sftp-server is the daemon or server side of the Secure FTP protocol. To be able to use sftp to your host, edit the SSH daemon configuration file <code>/etc/sshd_config</code>. Search for the following line and remove the hash-sign in front of it:</p>
<p><code>Subsystem sftp /usr/libexec/sftp-server</code></p>
<p>Then restart your SSH daemon.</p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/ssh-the-secure-shell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

