{"id":145,"date":"2022-11-25T08:31:23","date_gmt":"2022-11-25T06:31:23","guid":{"rendered":"https:\/\/raspberrytips.com\/?p=145"},"modified":"2025-08-08T10:52:13","modified_gmt":"2025-08-08T08:52:13","slug":"ssh-password-raspberry-pi","status":"publish","type":"post","link":"https:\/\/raspberrytips.com\/ssh-password-raspberry-pi\/","title":{"rendered":"What Is the SSH Password for Raspberry Pi?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you want to access your Raspberry Pi from a remote computer, you can use SSH and get a terminal as if you were on the Raspberry Pi directly. But, you&#8217;ll need the IP address and the SSH password in order to do it. So, what is the default SSH password of the Raspberry Pi?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Raspberry Pi OS no longer provides a default login and password (it used to be &#8220;pi&#8221; \/ &#8220;raspberry&#8221;). Instead, a setup wizard appears on first boot to help create the user&#8217;s credentials. In addition, the SSH service is not enabled by default and needs to be activated.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, you&#8217;ll learn about other important points on SSH connections to a Raspberry Pi, including what SSH is, how to enable SSH on a Raspberry Pi, how to make the SSH service start automatically at each reboot, which IP address to use and which port to connect to, and how to log into SSH without having to type a password.<\/p>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);background-color:var(--global-palette7, #EDF2F7);box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-contents-title{font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-content-wrap .kb-table-of-content-list{font-size:var(--global-kb-font-size-sm, 0.9rem);font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-basiccircle .kb-table-of-contents-icon-trigger:after, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-basiccircle .kb-table-of-contents-icon-trigger:before, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-arrowcircle .kb-table-of-contents-icon-trigger:after, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-arrowcircle .kb-table-of-contents-icon-trigger:before, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-xclosecircle .kb-table-of-contents-icon-trigger:after, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-xclosecircle .kb-table-of-contents-icon-trigger:before{background-color:var(--global-palette7, #EDF2F7);}<\/style>\n\n<p class='ml_begpost' id='ml_begpost_glossary'>If you\u2019re feeling lost in all the Raspberry Pi jargon, I\u2019ve got something to help you out. <a rel='noopener' href='https:\/\/raspberrytips.com\/downloads\/?source=begpost&#038;lm=1' target='_blank'>I\u2019ve created a free glossary<\/a> that explains all the essential terms and abbreviations in a way that\u2019s easy to understand. It\u2019s a great resource to have by your side. <a rel='noopener' href='https:\/\/raspberrytips.com\/downloads\/?source=begpost&#038;lm=1' target='_blank'><b>Get your free copy here<\/b><\/a>.<\/p>\n\n\n<h2 class=\"wp-block-heading\">What Is SSH?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SSH stands for <strong>S<\/strong>ecure <strong>SH<\/strong>ell. It&#8217;s a cryptographic network protocol that is mostly used to <b>connect to another computer on a network securely<\/b>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In general, SSH will allow you to access the shell (terminal) of your Raspberry Pi from another PC.<br>This&nbsp;solution can be convenient if you want to install things from your main PC (and copy\/paste commands) or is even essential if you don&#8217;t use a screen with your Raspberry Pi.<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"container-lazyload preview-lazyload container-youtube js-lazyload--not-loaded\"><a href=\"https:\/\/www.youtube.com\/watch?v=2mskTIe507g\" class=\"lazy-load-youtube preview-lazyload preview-youtube\" data-video-title=\"You don&#039;t know everything about SSH on Raspberry Pi\" title=\"Play video &quot;You don&#039;t know everything about SSH on Raspberry Pi&quot;\">https:\/\/www.youtube.com\/watch?v=2mskTIe507g<\/a><noscript>Video can&#8217;t be loaded because JavaScript is disabled: <a href=\"https:\/\/www.youtube.com\/watch?v=2mskTIe507g\" title=\"You don&#039;t know everything about SSH on Raspberry Pi\">You don&#039;t know everything about SSH on Raspberry Pi (https:\/\/www.youtube.com\/watch?v=2mskTIe507g)<\/a><\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the next paragraphs, we will discuss how to set it up, step by step, starting with the basics, and then adding a bit of comfort.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I want to keep this short, but I have <a href=\"https:\/\/raspberrytips.com\/ssh-guide-raspberry-pi\/\" data-type=\"post\" data-id=\"10748\">an entire article dedicated to SSH on Raspberry Pi<\/a>, that you can read if you want to know more about this very useful protocol. If you do so, you can probably skip the next sections of this article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Connect to Raspberry Pi With SSH?<\/h2>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#fadce4\"><strong>Note<\/strong>: If you want to see all these steps in action, I have a video lesson available for the community members. <a rel=\"noreferrer noopener\" href=\"https:\/\/raspberrytips.com\/school\/community\/?coupon=IP25CTY\" target=\"_blank\">You can join here and watch it directly<\/a> if you are interested (with 10+ other lessons for Raspberry Pi and many other benefits).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">From Windows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you use Microsoft Windows on your main PC, you will probably install and use a third-party tool to use SSH, like <a href=\"https:\/\/termius.com\/\">Termius<\/a> or&nbsp;<a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\" target=\"_blank\" rel=\"noreferrer noopener\">Putty<\/a>, for example. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On Windows 11, the <em>ssh<\/em> command is available from the command prompt, but it&#8217;s bare bones. Full client programs like Termius or Putty are often better.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Putty is one of the most used software programs to access SSH hosts on Windows<\/strong>, and if you start it will be perfect. Download the file matching your computer specifications. And depending on the version chosen, install it or not (there is a portable edition), then launch it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Putty looks like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"435\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2018\/08\/puTTy-configuration.png\" alt=\"puTTy configuration\" class=\"wp-image-147\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2018\/08\/puTTy-configuration.png 456w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2018\/08\/puTTy-configuration-300x286.png 300w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">To log in, type the IP address in the &#8220;Host Name&#8221; field and click on &#8220;Open&#8221;.<br>If you need help with this,  here&#8217;s how to <a href=\"https:\/\/raspberrytips.com\/find-current-ip-raspberry-pi\/\">find the current IP address of Raspberry Pi<\/a>. <br>Or if you prefer an easier way with your phone, install the <a href=\"https:\/\/raspberrytips.com\/android-app\/\">RaspberryTips Android App<\/a>, and it will automatically find your Raspberry Pi&#8217;s IP address for you!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a reminder, <strong>the default SSH login and password on older Raspberry Pi OS versions are:<\/strong><br><strong>&#8211; Login: pi<\/strong><br><strong>&#8211; Password: raspberry<\/strong><br>On the latest version of Raspberry Pi OS, you had to create a username\/ password on first boot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have <a rel=\"noopener\" data-lasso-id=\"266\" href=\"https:\/\/raspberrytips.com\/change-raspberry-pi-username\/\" data-type=\"post\" data-id=\"7071\" target=\"_blank\">changed your Raspberry Pi username<\/a> and\/or password, use the same credentials as when you open your session directly on the Raspberry Pi. And if you don&#8217;t remember the one you set, you can <a href=\"https:\/\/raspberrytips.com\/forgot-raspberry-pi-password\/\" target=\"_blank\" rel=\"noreferrer noopener\">use this guide to reset a forgotten password<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the connection doesn&#8217;t work for now, don&#8217;t worry. I&#8217;ll explain what to do later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">From Linux or Mac<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you use a Unix-based system, i.e., any Linux distribution or even macOS, <strong>you can use the &#8220;ssh&#8221; command directly<\/strong> to connect from a terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on your system, you might need to install it. For example, on a distribution based on Debian:<br><code>sudo apt update<br>sudo apt install ssh<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The command to connect to your Raspberry Pi will be something like this: <br><code>ssh USER@IP<\/code><br>For example:<br><code>ssh pat@192.168.30.19<\/code><\/p>\n\n\n\r\n\t\t<!-- wp:paragraph -->\r\n\t<p  id=\"inpost_lm_linux_commands\"><b>Tip: <\/b> Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them.\u00a0You can <a rel=\"noreferrer noopener\" href=\"https:\/\/raspberrytips.com\/downloads\/?source=rb_linux&lm=4\" target=\"_blank\">grab the PDF here<\/a> if you want to save some time.<\/p>\r\n\t<!-- \/wp:paragraph -->\r\n\t\t\n\n\n<p class=\"wp-block-paragraph\">Replace <strong>USER<\/strong> with your username, and <strong>IP<\/strong> with the local address of your Raspberry Pi. <br>If you need help with this, here&#8217;s how to <a href=\"https:\/\/raspberrytips.com\/find-current-ip-raspberry-pi\/\">find the current IP address of Raspberry Pi<\/a>. <br>Or if you prefer an easier way with your phone, install the <a href=\"https:\/\/raspberrytips.com\/android-app\/\">RaspberryTips Android App<\/a>, and it will automatically find your Raspberry Pi&#8217;s IP address for you!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"386\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_cmd_pi.jpg\" alt=\"\" class=\"wp-image-42301\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_cmd_pi.jpg 955w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_cmd_pi-300x121.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_cmd_pi-768x310.jpg 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><figcaption class=\"wp-element-caption\">Type &#8220;yes&#8221; to confirm the connection the first time. Enter your password, and you&#8217;ll be connected to the remote computer.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">As a reminder, <strong>the default SSH login and password on the Legacy edition of Raspberry Pi OS are:<\/strong><br><strong>&#8211; Login: pi<\/strong><br><strong>&#8211; Password: raspberry<\/strong><br>On recent versions, you should&#8217;ve created a different user and password, use that one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your attempt to connect failed, don&#8217;t worry, I&#8217;ll explain why and what to do next.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Enable SSH on a Raspberry Pi<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As mentioned in the introduction, the SSH protocol is not enabled by default on Raspberry Pi OS (for security reasons).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you use Raspberry Pi OS <a href=\"https:\/\/raspberrytips.com\/raspberry-pi-os-lite-vs-desktop\/\">Desktop or Lite edition<\/a>, the first thing you need to do is to enable SSH.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">From the Desktop Interface<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you have a desktop environment, you need to enable it yourself by going to the <strong>main menu &gt; Preferences &gt; Raspberry Pi Configuration<\/strong>.<br>Go to the &#8220;Interfaces&#8221; tab and enable SSH:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"470\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/01\/ssh_enabled-1.jpg\" alt=\"\" class=\"wp-image-32016\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/01\/ssh_enabled-1.jpg 881w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/01\/ssh_enabled-1-300x160.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/01\/ssh_enabled-1-768x410.jpg 768w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">From a Terminal<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The same idea applies from a terminal: you need to <strong>start the SSH service manually<\/strong>.<br>To do this, type the following command:<br><code>sudo systemctl start ssh<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also check the service status by typing:<br><code>sudo systemctl status ssh<\/code><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"97\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_status.jpg\" alt=\"systemctl status ssh\" class=\"wp-image-42302\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_status.jpg 815w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_status-300x36.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/ssh_status-768x91.jpg 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">By the way, if you want to enable SSH directly on a fresh install, you can check this tutorial on <a href=\"https:\/\/raspberrytips.com\/raspberry-pi-headless-setup\/\" data-type=\"post\" data-id=\"1607\" data-lasso-id=\"268\">how to do a headless installation (no screen\/keyboard required)<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Auto-Start SSH on Boot?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You will quickly realize that the SSH service when enabled manually from the command line, <strong>does not load automatically on startup<\/strong>. So, you have to find a way to force it to start.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are a couple of achieves you achieve this. For example, you could just run this command:<br><code>sudo systemctl enable ssh<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another option that might be easier for some of you, is to <a href=\"https:\/\/raspberrytips.com\/raspi-config-guide\/\">enable it with <em>raspi-config<\/em><\/a> (<strong>Interface options &gt; SSH<\/strong>). It will start the service immediately, and also automatically enable it on boot.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"150\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/raspiconfig_enable_ssh.jpg\" alt=\"raspi-config enable ssh\" class=\"wp-image-42303\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/raspiconfig_enable_ssh.jpg 746w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/raspiconfig_enable_ssh-300x60.jpg 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Which IP Address and Port to Connect?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, the <strong>SSH service is open on port 22.<\/strong> You must, therefore, connect to the IP of the Raspberry Pi on port 22.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When connecting from another Linux PC, <strong>port 22 is tried by default when no port is specified<\/strong>:<br><code>ssh pat@192.168.1.200<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But if you changed it, <strong>you can specify the port with the -p option:<br><\/strong><code>ssh pat@192.168.1.200 -p 2222<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace 2222 with the port you&#8217;ve chosen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As mentioned above, if you do not <a rel=\"noopener\" data-lasso-id=\"270\" href=\"https:\/\/raspberrytips.com\/find-current-ip-raspberry-pi\/\">know the current IP address of the Raspberry Pi<\/a>, do not hesitate to take a look at my post on the subject where I explain how to find it easily. This&nbsp;post will also tell <strong>how to set it static, so you do not have to search for it<\/strong> every time you want to log in again.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Connect SSH Without a Password<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You now know how to activate the SSH service on your Raspberry Pi and how to connect to it.<br>That&#8217;s great, but if you have to use it as often as I do, <strong>typing the password every time will quickly become tiresome<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, there&#8217;s a way to <a href=\"https:\/\/raspberrytips.com\/generate-ssh-keys-on-raspberry-pi\/\" data-type=\"post\" data-id=\"18425\">create an SSH key<\/a> to log in and no longer have to use the password.<br>I will explain how to set this up according to your operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, the password connection will still be possible if you lose the key or use another computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">From Windows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First thing, on Windows <strong>you will need the full suite of Putty, with PuttyGen and Pagaent<\/strong>.<br>So if you downloaded only the SSH client in the portable version, you have to install everything.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will also <strong>need a tool to transfer a file to your Raspberry Pi<\/strong>. <a rel=\"noopener\" data-lasso-id=\"271\" href=\"https:\/\/winscp.net\/eng\/download.php\">WinSCP<\/a> is a good choice.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Create your SSH Keys with PuttyGen<\/strong>:\n<ol class=\"wp-block-list\">\n<li>Start PuttyGen.<\/li>\n\n\n\n<li>Select RSA as the type of key.<\/li>\n\n\n\n<li>Enter 4096 as the number of bits.<\/li>\n\n\n\n<li>Click Generate.<\/li>\n\n\n\n<li>Let all other options by default, no passphrase.<\/li>\n\n\n\n<li>Save the keys where you want.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Transfer the public key to the Raspberry Pi<\/strong> with WinSCP.\n<ol class=\"wp-block-list\">\n<li>Add a new site with our Raspberry Pi IP and credentials.<\/li>\n\n\n\n<li>Connect to this site.<\/li>\n\n\n\n<li>On the left side, go to the folder where you saved your keys.<\/li>\n\n\n\n<li>On the right side, go to the \/home\/pi folder.<\/li>\n\n\n\n<li>Transfer the public key to the Raspberry (drag &amp; drop).<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Allow this key on the Raspberry Pi<\/strong>.\n<ol class=\"wp-block-list\">\n<li>Connect to the Raspberry Pi with Putty.<\/li>\n\n\n\n<li>Add the public keys just transferred to the allowed keys: <br><code>cat \/home\/pi\/your_key.pub &gt;&gt; ~\/.ssh\/authorized_keys <\/code><\/li>\n\n\n\n<li>Close putty.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Try to connect again with Putty.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This&nbsp;test should not require you to type a password and<strong> log in directly<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you still need a login, <strong>enter pi@IP in the &#8220;Hostname&#8221; field<\/strong> by replacing IP with the IP address of the Raspberry Pi. You can also use the name directly if you have <a rel=\"noopener\" data-lasso-id=\"272\" href=\"https:\/\/raspberrytips.com\/set-new-hostname-raspberry-pi\/\" data-type=\"post\" data-id=\"3406\" target=\"_blank\">set your hostname correctly as explained here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: If you are a premium member <a rel=\"noreferrer noopener\" href=\"https:\/\/raspberrytips.com\/school\/community\/?coupon=IP25CTY\" target=\"_blank\">in the community<\/a>, I have an entire lesson about SSH, where I show you how to do this, step-by-step, in a video format. I highly recommend watching it if you can, as it&#8217;s way easier to understand with a visual support.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">From Linux or Mac<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To create an SSH key on Linux, the procedure is slightly different, but the steps are the same:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>If you don&#8217;t already have one, <strong>create your SSH keys with this command<\/strong>:<br><code>ssh-keygen -t rsa <\/code><br>Just press Enter for each question, default path and no passphrase. <br><\/li>\n\n\n\n<li><strong>Copy the public key file to your Raspberry Pi: <\/strong><br><code>scp ~\/.ssh\/id_rsa.pub pat@IP:\/home\/pat\/your_key.pub<\/code><br>Replace &#8216;pat&#8217; with your username and also in the path (<em>\/home\/pat<\/em>).<br>Replace IP with your Raspberry Pi&#8217;s IP address.<br>You can name the key however you want.<br><img decoding=\"async\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/11\/sshkey_linux_scp.jpg\" alt=\"scp copy ssh key from linux pc to raspberry pi\"><br><\/li>\n\n\n\n<li><strong>Add this key to the allowed keys <\/strong>by using this command on the Raspberry Pi: <br><code>cat \/home\/$USER\/your_key.pub &gt;&gt; ~\/.ssh\/authorized_keys <\/code><br><\/li>\n\n\n\n<li>Finally, let&#8217;s try to connect again: <br><code>ssh pat@IP<\/code><br>This time, you should be able to log in directly without being required to type a password.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here you are, at maximum comfort, to use SSH from this PC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And that&#8217;s it, you now know:<br>&#8211; What is SSH?<br>&#8211; How to activate SSH on a Raspberry Pi.<br>&#8211; How to make the SSH service start automatically at each reboot.<br>&#8211; Which IP address and which port to connect to.<br>&#8211; How not to have to type a password to log in to SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You are now ready to tackle more fun projects on your Raspberry Pi, here are a few ideas:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/raspberrytips.com\/raspberry-pi-beginners-projects\/\" data-type=\"post\" data-id=\"7423\">15 Easy Projects for Raspberry Pi Beginners (With Links)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/raspberrytips.com\/wordpress-on-raspberry-pi\/\" data-type=\"post\" data-id=\"423\">Step-by-step Guide to Install WordPress on a Raspberry Pi<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/raspberrytips.com\/best-raspberry-pi-robots-kits\/\" data-type=\"post\" data-id=\"4797\">The 11 Best Raspberry Pi Robots Kits for Beginners<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you have any other questions or are stuck somewhere, do not hesitate to ask for help <a rel=\"noreferrer noopener\" aria-label=\"in the community (opens in a new tab)\" href=\"https:\/\/raspberrytips.com\/community\" target=\"_blank\">in the community<\/a>.<\/p>\n\n\n<section id=\"end-block-pi\">\r\n<div class=\"rt-community-card \">\r\n\t<div class=\"rt-community-card__inner\">\r\n\r\n\t\t<div class=\"rt-community-card__main\">\r\n\t\t\t<h3 class=\"rt-community-card__headline\">\r\n\t\t\t\tNot getting the same result?\t\t\t<\/h3>\r\n\r\n\t\t\t<p class=\"rt-community-card__description\">\r\n\t\t\t\tEven when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.\t\t\t<\/p>\r\n\r\n\t\t\t<div class=\"rt-community-card__actions\">\r\n\t\t\t\t<a class=\"rt-community-card__button\" href=\"https:\/\/raspberrytips.com\/school\/community\/?coupon=EBCTY\">\r\n\t\t\t\t\t<span>Ask your question now<\/span>\r\n\t\t\t\t\t<span class=\"rt-community-card__button-arrow\">\u2192<\/span>\r\n\t\t\t\t<\/a>\r\n\r\n\t\t\t\t\t\t\t\t\t<div class=\"rt-community-card__small\">\r\n\t\t\t\t\t\t<span class=\"rt-community-card__small-lock\">\ud83d\udd12<\/span>\r\n\t\t\t\t\t\tNo risk. Cancel anytime.\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\r\n\t\t\t\t\t<div class=\"rt-community-card__side\">\r\n\t\t\t\t<ul class=\"rt-community-card__benefits\">\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Get help on your exact issue<\/li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Access step-by-step videos for tricky setups<\/li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Browse the website without ads<\/li>\r\n\t\t\t\t\t\t\t\t\t<\/ul>\r\n\t\t\t<\/div>\r\n\t\t\r\n\t<\/div>\r\n<\/div>\r\n<\/section>\r\n\r\n<style>\r\n.rt-community-card {\r\n\t--rt-bg: #f7f7f9;\r\n\t--rt-border: #e4e4e8;\r\n\t--rt-text: #15171b;\r\n\t--rt-muted: #5b6270;\r\n\t--rt-accent: #C61E4A;\r\n\t--rt-accent-hover: #aa183f;\r\n\t--rt-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);\r\n\r\n\tmargin: 36px 0;\r\n\tcolor: var(--rt-text);\r\n\tfont-family: inherit;\r\n}\r\n\r\n.rt-community-card__inner {\r\n\tdisplay: grid;\r\n\tgrid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.95fr);\r\n\tgap: 34px;\r\n\talign-items: start;\r\n\tbackground: var(--rt-bg);\r\n\tborder: 1px solid var(--rt-border);\r\n\tborder-radius: 22px;\r\n\tpadding: 34px 36px;\r\n\tbox-shadow: var(--rt-shadow);\r\n}\r\n\r\n.rt-community-card__main {\r\n\tmin-width: 0;\r\n}\r\n\r\n.rt-community-card__side {\r\n\tborder-left: 1px solid #e1e1e6;\r\n\tpadding-left: 28px;\r\n}\r\n\r\n.rt-community-card__benefits {\r\n\tmargin: 6px 0 0;\r\n\tpadding: 0;\r\n\tlist-style: none;\r\n\tdisplay: grid;\r\n\tgap: 18px;\r\n}\r\n\r\n.rt-community-card__benefits li {\r\n\tposition: relative;\r\n\tpadding-left: 18px;\r\n\tfont-size: 18px;\r\n\tline-height: 1.55;\r\n\tcolor: var(--rt-text);\r\n}\r\n\r\n.rt-community-card__benefits li::before {\r\n\tcontent: \"\";\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0.72em;\r\n\twidth: 7px;\r\n\theight: 7px;\r\n\tborder-radius: 999px;\r\n\tbackground: var(--rt-accent);\r\n\ttransform: translateY(-50%);\r\n}\r\n\r\n.rt-community-card__actions {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\talign-items: flex-start;\r\n\tgap: 10px;\r\n\tmargin-top: 30px;\r\n}\r\n\r\n.rt-community-card__button {\r\n\tdisplay: inline-flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tgap: 10px;\r\n\tmin-height: 60px;\r\n\tpadding: 0 28px;\r\n\tborder-radius: 14px;\r\n\tbackground: var(--rt-accent);\r\n\tcolor: #fff !important;\r\n\ttext-decoration: none !important;\r\n\tfont-size: 21px;\r\n\tfont-weight: 700;\r\n\tline-height: 1;\r\n\tbox-shadow: 0 12px 22px rgba(198, 30, 74, 0.22);\r\n\ttransition: background .2s ease, transform .2s ease, box-shadow .2s ease;\r\n}\r\n\r\n.rt-community-card__button:hover {\r\n\tbackground: var(--rt-accent-hover);\r\n\tcolor: #fff !important;\r\n\ttransform: translateY(-1px);\r\n\tbox-shadow: 0 14px 26px rgba(198, 30, 74, 0.28);\r\n}\r\n\r\n.rt-community-card__button-arrow {\r\n\tfont-size: 20px;\r\n\tline-height: 1;\r\n}\r\n\r\n.rt-community-card__small {\r\n\tfont-size: 15px;\r\n\tline-height: 1.5;\r\n\tcolor: #6a717d;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.rt-community-card__small-lock {\r\n\tmargin-right: 6px;\r\n\tfont-size: 14px;\r\n\tvertical-align: baseline;\r\n}\r\n\r\n\/* Tablet *\/\r\n@media (max-width: 900px) {\r\n\t.rt-community-card {\r\n\t\tmargin: 28px 0;\r\n\t}\r\n\r\n\t.rt-community-card__inner {\r\n\t\tgrid-template-columns: 1fr;\r\n\t\tgap: 24px;\r\n\t\tpadding: 28px 24px;\r\n\t}\r\n\r\n\t.rt-community-card__side {\r\n\t\tborder-left: 0;\r\n\t\tborder-top: 1px solid #e1e1e6;\r\n\t\tpadding-left: 0;\r\n\t\tpadding-top: 22px;\r\n\t}\r\n\r\n\t.rt-community-card__benefits {\r\n\t\tgrid-template-columns: 1fr;\r\n\t\tgap: 12px;\r\n\t}\r\n}\r\n\r\n\/* Mobile *\/\r\n@media (max-width: 640px) {\r\n\t.rt-community-card__inner {\r\n\t\tpadding: 22px 18px;\r\n\t\tborder-radius: 18px;\r\n\t\tgap: 20px;\r\n\t}\r\n\t\r\n\t.rt-community-card__side {\r\n\t\tpadding-top: 18px;\r\n\t}\r\n\r\n\t.rt-community-card__benefits li {\r\n\t\tfont-size: 16px;\r\n\t}\r\n\r\n\t.rt-community-card__actions {\r\n\t\tmargin-top: 24px;\r\n\t\talign-items: stretch;\r\n\t}\r\n\r\n\t.rt-community-card__button {\r\n\t\twidth: 100%;\r\n\t\tmin-height: 56px;\r\n\t\tfont-size: 18px;\r\n\t\tpadding: 0 20px;\r\n\t}\r\n\r\n\t.rt-community-card__small {\r\n\t\ttext-align: center;\r\n\t\tpadding-left: 0;\r\n\t}\r\n}\r\n<\/style>\r\n\t\r\n","protected":false},"excerpt":{"rendered":"<p>If you want to access your Raspberry Pi from a remote computer, you can use SSH and get a terminal as if you were on the Raspberry Pi directly. But, you&#8217;ll need the IP address and the SSH password in order to do it. So, what is the default SSH password of the Raspberry Pi?&#8230;<\/p>\n","protected":false},"author":1,"featured_media":14556,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[24],"tags":[],"class_list":["post-145","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-beginners"],"taxonomy_info":{"category":[{"value":24,"label":"Beginner's guides"}]},"featured_image_src_large":["https:\/\/raspberrytips.com\/wp-content\/uploads\/2018\/08\/ssh-password-raspberry-pi-1024x683.jpg",1024,683,true],"author_info":{"display_name":"Patrick Fromaget","author_link":"https:\/\/raspberrytips.com\/author\/admin\/"},"comment_info":3,"category_info":[{"term_id":24,"name":"Beginner's guides","slug":"beginners","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":86,"filter":"raw","cat_ID":24,"category_count":86,"category_description":"","cat_name":"Beginner's guides","category_nicename":"beginners","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts\/145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/comments?post=145"}],"version-history":[{"count":51,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts\/145\/revisions"}],"predecessor-version":[{"id":42949,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts\/145\/revisions\/42949"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/media\/14556"}],"wp:attachment":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}