<?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>ssh &#8211; Tunnel In</title>
	<atom:link href="https://tunnelin.com/blog/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>https://tunnelin.com</link>
	<description>A Single place for all your web services.</description>
	<lastBuildDate>Fri, 05 Feb 2021 14:18:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.5</generator>

<image>
	<url>https://tunnelin.com/wp-content/uploads/2020/02/favicon.ico</url>
	<title>ssh &#8211; Tunnel In</title>
	<link>https://tunnelin.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>ssh into raspberry pi from anywhere in the world [3 easy steps]</title>
		<link>https://tunnelin.com/blog/ssh-into-raspberry-pi-from-anywhere-in-the-world</link>
					<comments>https://tunnelin.com/blog/ssh-into-raspberry-pi-from-anywhere-in-the-world#respond</comments>
		
		<dc:creator><![CDATA[vahan]]></dc:creator>
		<pubDate>Fri, 26 Jun 2020 23:48:30 +0000</pubDate>
				<category><![CDATA[Tunnel In]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[ssh]]></category>
		<guid isPermaLink="false">https://tunnelin.com/?p=1406</guid>

					<description><![CDATA[In 3 easy steps, this article describes how to [&#8230;]]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="1406" class="elementor elementor-1406" data-elementor-settings="[]">
						<div class="elementor-inner">
							<div class="elementor-section-wrap">
							<section class="elementor-section elementor-top-section elementor-element elementor-element-0823711 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="0823711" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
							<div class="elementor-row">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a0bd6b5" data-id="a0bd6b5" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
							<div class="elementor-widget-wrap">
						<div class="elementor-element elementor-element-677dc99 elementor-widget elementor-widget-text-editor" data-id="677dc99" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>In 3 easy steps, this article describes how to ssh into raspberry pi.</p><p><strong>SSH </strong>(<strong>Secure Shell</strong>) is a network protocol which allows to securely operate network services over an unsecured network. SSH provides a secure channel and has client-server architecture i.e. one can connect to the <a href="https://en.wikipedia.org/wiki/Comparison_of_SSH_servers" target="_blank" rel="noopener">SSH server</a> using an <a href="https://en.wikipedia.org/wiki/Comparison_of_SSH_clients" target="_blank" rel="noopener">SSH client</a> application. By default Raspberry Pi OS (previously called Raspbian) comes with <a href="https://www.openssh.com/" target="_blank" rel="noopener">OpenSSH</a> server preinstalled which can handle user authentication, terminal connections, encryption, file transfers, and tunneling, however, to use it we need to enable the service. Here are 3 easy steps to do that:</p><ul><li><a href="#enable-ssh" target="_blank" rel="noopener">1. enable ssh on raspberry pi</a></li><li><a href="#ssh-into-raspberry-pi" target="_blank" rel="noopener">2. ssh into raspberry pi</a></li><li><a href="#setup-tunnel-in" target="_blank" rel="noopener">3. setup Tunnel In for ssh into raspberry pi from outside of your local network</a></li></ul>					</div>
						</div>
				</div>
						</div>
					</div>
		</div>
								</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-d19adcf elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="d19adcf" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
							<div class="elementor-row">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-781823b" data-id="781823b" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
							<div class="elementor-widget-wrap">
						<div class="elementor-element elementor-element-540101f elementor-widget elementor-widget-heading" data-id="540101f" data-element_type="widget" id="enable-ssh" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-large">1. enable ssh on raspberry pi</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-2c2c431 elementor-widget elementor-widget-text-editor" data-id="2c2c431" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>First of all, do not forget to change the default password of Pi when enabling SSH service, this is required safety measures. </p><p>There are a couple of ways to enable ssh service in raspberry pi.</p><p> </p><p><b><u>Desktop</u></b> &#8211; If your raspberry pi is running the desktop version of Raspberry Pi OS the most convenient way to enable ssh service is from the menu choose <b>Preferences</b> then <b>Raspberry Pi Configuration</b> then in the opened window click on <b>Interfaces</b> tab<b> </b>which will show following content:</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-c6d4adf elementor-widget elementor-widget-image" data-id="c6d4adf" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="478" height="404" src="https://tunnelin.com/wp-content/uploads/2020/06/raspberry-pi-configuration.png" class="attachment-full size-full" alt="raspberry pi configuration" srcset="https://tunnelin.com/wp-content/uploads/2020/06/raspberry-pi-configuration.png 478w, https://tunnelin.com/wp-content/uploads/2020/06/raspberry-pi-configuration-300x254.png 300w" sizes="(max-width: 478px) 100vw, 478px" />														</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-f39e4d8 elementor-widget elementor-widget-text-editor" data-id="f39e4d8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>Here we just need to choose the <b>Enabled</b> option in the second row and click on the <b>OK </b>button to save the configuration.</p><p> </p><p><b><u>Console</u></b>  &#8211; If your raspberry running Raspberry Pi OS without a desktop or you want to enable ssh from a terminal you can run <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">sudo raspi-config </code> command in terminal which will open following configuration tool:</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-6d587bf elementor-widget elementor-widget-image" data-id="6d587bf" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="640" height="255" src="https://tunnelin.com/wp-content/uploads/2020/06/raspi-config.png" class="attachment-medium_large size-medium_large" alt="raspi-config" srcset="https://tunnelin.com/wp-content/uploads/2020/06/raspi-config.png 640w, https://tunnelin.com/wp-content/uploads/2020/06/raspi-config-300x120.png 300w" sizes="(max-width: 640px) 100vw, 640px" />														</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-b92b6f6 elementor-widget elementor-widget-text-editor" data-id="b92b6f6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>From this menu please select <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">Interfacing Options</code> and hit Enter. As a result, we will see the following options:</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-df77414 elementor-widget elementor-widget-image" data-id="df77414" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="640" height="257" src="https://tunnelin.com/wp-content/uploads/2020/06/raspi-config-interfacing-options-768x308.png" class="attachment-medium_large size-medium_large" alt="raspi config interfacing options" srcset="https://tunnelin.com/wp-content/uploads/2020/06/raspi-config-interfacing-options-768x308.png 768w, https://tunnelin.com/wp-content/uploads/2020/06/raspi-config-interfacing-options-300x120.png 300w, https://tunnelin.com/wp-content/uploads/2020/06/raspi-config-interfacing-options.png 879w" sizes="(max-width: 640px) 100vw, 640px" />														</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-e4aeb89 elementor-widget elementor-widget-text-editor" data-id="e4aeb89" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>Now we need to navigate to and select the <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">SSH</code> option, then choose <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">Yes</code>,  <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">Ok</code>, and <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">Finish</code>.</p><p> </p><p><u style="font-weight: bold;">Console alternative way</u> &#8211; In case we are not want to use any specific configuration tool for enabling ssh we can do it via <strong>systemctl</strong> command (which is a tool to control services). We just need to run these 2 commands in terminal for enabling and starting ssh service: <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">sudo systemctl enable ssh</code> and <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">sudo systemctl start ssh</code>.</p><p> </p><p> </p><p><b><u>Headless</u> &#8211; </b>All previous methods require a monitor and keyboard attached to our raspberry pi. What if we don&#8217;t have them connected to raspberry? There is still a way to enable ssh service and connect remotely to the device. </p><p>When we flashing a Raspberry Pi OS onto a blank micro SD card, it will create two partitions. The smallest one is labeled as a boot. To enable SSH we just need to create a file in the root of the boot partition called &#8220;<b>ssh</b>&#8221; (without any extension). The content of the file does not matter, moreover the file will be deleted on the first launch of the device. All these actions can be done on another computer, that is why this method called headlessly and does not require the monitor and keyboard connected to the raspberry pi.</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-947a570 elementor-widget elementor-widget-image" data-id="947a570" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="640" height="373" src="https://tunnelin.com/wp-content/uploads/2020/06/raspberry-headless-ssh.png" class="attachment-medium_large size-medium_large" alt="raspberry pi headless ssh" srcset="https://tunnelin.com/wp-content/uploads/2020/06/raspberry-headless-ssh.png 705w, https://tunnelin.com/wp-content/uploads/2020/06/raspberry-headless-ssh-300x175.png 300w" sizes="(max-width: 640px) 100vw, 640px" />														</div>
						</div>
				</div>
						</div>
					</div>
		</div>
								</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-7cb5e87 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="7cb5e87" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
							<div class="elementor-row">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-11639c8" data-id="11639c8" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
							<div class="elementor-widget-wrap">
						<div class="elementor-element elementor-element-f4fc7f3 elementor-widget elementor-widget-heading" data-id="f4fc7f3" data-element_type="widget" id="ssh-into-raspberry-pi" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-large">2. ssh into raspberry pi</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-8d54591 elementor-widget elementor-widget-text-editor" data-id="8d54591" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>Once we enabled ssh service in raspberry, it is ready to accept ssh connections and we are ready to ssh into raspberry pi from our local network. To connect to raspberry we need to know the <strong>IP address </strong>or <strong>hostname</strong> of our device so we will make a proper connection. </p><p>By default, our raspberry should have <strong>raspberrypi.local</strong> hostname, but let&#8217;s dig more and find out the IP address of our device.</p><p>First of all, if you have a monitor and keyboard connected to your device we can run <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">ifconfig</code> command in terminal and find out the IP address.</p><p>Alternatively, if we have access to the router&#8217;s configuration page, we can find out the IP address from the router&#8217;s connections list.</p><p>However, the most reliable way to do this is to use a network scanning tool like <a href="https://angryip.org/" target="_blank" rel="noopener">Angry IP Scanner</a>, which is an open-source, cross-platform, and very intuitive tool. This method does not require access to the router or raspberry pi directly.</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-1dd3452 elementor-widget elementor-widget-image" data-id="1dd3452" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="600" height="360" src="https://tunnelin.com/wp-content/uploads/2020/06/angry-ip-scanner.png" class="attachment-medium_large size-medium_large" alt="angry ip scanner" srcset="https://tunnelin.com/wp-content/uploads/2020/06/angry-ip-scanner.png 600w, https://tunnelin.com/wp-content/uploads/2020/06/angry-ip-scanner-300x180.png 300w" sizes="(max-width: 600px) 100vw, 600px" />														</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-6f61062 elementor-widget elementor-widget-text-editor" data-id="6f61062" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>Now we know the IP address of our device and ready to ssh into raspberry pi.</p>
<p>Now we need to choose a proper ssh client depending on which OS we want to ssh into raspberry pi. For macOS and Linux we can use <strong>terminal</strong><strong>&nbsp;</strong>which comes preinstalled on every distribution. We just need to run <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">ssh &lt;username&gt;@&lt;IP address&gt;</code> command to start a remote connection, where the default username of raspberry is <strong>pi</strong>. So for our specific case, the command would be <code style="background: #f2f1f0; font-family: Courier, monospace; font-size: 14px; white-space: pre; padding: 4px 8px; color: #222222; border: 1px solid #dddddd;">ssh pi@192.168.1.7</code>. After running a command it will ask a password and then after the authentication, you can interactively control your device.</p>
<p>For windows the most convenient ssh client is&nbsp;<a style="background-color: #ffffff;" href="https://www.putty.org/" target="_blank" rel="noopener">putty</a>, which is an open-source project and has a very intuitive interface:</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-504ad8a elementor-widget elementor-widget-image" data-id="504ad8a" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="452" height="442" src="https://tunnelin.com/wp-content/uploads/2020/06/putty.png" class="attachment-medium_large size-medium_large" alt="putty" srcset="https://tunnelin.com/wp-content/uploads/2020/06/putty.png 452w, https://tunnelin.com/wp-content/uploads/2020/06/putty-300x293.png 300w" sizes="(max-width: 452px) 100vw, 452px" />														</div>
						</div>
				</div>
						</div>
					</div>
		</div>
								</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-655eaef elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="655eaef" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
							<div class="elementor-row">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-70fde73" data-id="70fde73" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
							<div class="elementor-widget-wrap">
						<div class="elementor-element elementor-element-4ac584b elementor-widget elementor-widget-heading" data-id="4ac584b" data-element_type="widget" id="setup-tunnel-in" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-large">3. setup Tunnel In agent</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-16b619d elementor-widget elementor-widget-text-editor" data-id="16b619d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>Previous two sections covered a question of&nbsp;<b>how to ssh into raspberry pi</b>, so one can ask what is <b>Tunnel In</b> and why we need it?&nbsp;</p>
<p>Tunnel In is a platform that can allow to easily create secure tunnels and extend different services from being used only from the local network to be used everywhere around the globe. In other words, Tunnel In will allow you to ssh into raspberry pi even if you are not in the same network with your device, instead, you can ssh into raspberry pi remotely (from anywhere in the world).&nbsp;</p>
<p>To start using Tunnel In you just need to&nbsp;<a href="https://app.tunnelin.com/signup">create an account</a>&nbsp;of Tunnel In, setup the agent of Tunnel In (it supports Windows, Mac and Linux, for raspberry pi you should select Linux Console option) then you can monitor and manage your device remotely in our web platform:</p>					</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-4ab7e90 elementor-widget elementor-widget-image" data-id="4ab7e90" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
								<div class="elementor-image">
												<img width="342" height="274" src="https://tunnelin.com/wp-content/uploads/2020/06/ssh-into-raspberry-pi-tunnel-in.png" class="attachment-medium_large size-medium_large" alt="ssh into raspberry pi tunnel in" srcset="https://tunnelin.com/wp-content/uploads/2020/06/ssh-into-raspberry-pi-tunnel-in.png 342w, https://tunnelin.com/wp-content/uploads/2020/06/ssh-into-raspberry-pi-tunnel-in-300x240.png 300w" sizes="(max-width: 342px) 100vw, 342px" />														</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-31931f0 elementor-widget elementor-widget-text-editor" data-id="31931f0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
								<div class="elementor-text-editor elementor-clearfix">
				<p>Then you have two options &#8211; <strong>Try in the browser</strong> which allows to ssh into raspberry pi without installing any ssh client and use a browser as an ssh client or <strong>See configurations </strong>and by using the configurations, which system assigns to your tunnel, connect to the raspberry pi using the ssh client you like most.</p><p>Tunnel In can also create https tunnels to securely expose your local running webserver to the world. This may be useful if you are running <a href="https://octoprint.org/" target="_blank" rel="noopener">OctoPrint</a> for managing your 3D printers, <a href="https://www.home-assistant.io/" target="_blank" rel="noopener">Home Assistant</a>, or <a href="https://www.openhab.org/" target="_blank" rel="noopener">openHAB</a> for controlling smart home or any other web applications.</p><p>Tunnel In also can create proxy tunnels and make you able to use your remote device&#8217;s internet as well as VNC tunnels to allow you remotely access to your device&#8217;s desktop and many more (theoretically Tunnel In can forward and network services you are running locally on your devices and allow you to consume these services remotely).</p><p>By the way, you can play with Tunnel In functionality in our <a href="https://demo.tunnelin.com/" target="_blank" rel="noopener">Demo</a> account before registering an account.</p>					</div>
						</div>
				</div>
						</div>
					</div>
		</div>
								</div>
					</div>
		</section>
						</div>
						</div>
					</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://tunnelin.com/blog/ssh-into-raspberry-pi-from-anywhere-in-the-world/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
