Remotely login into SSH and SFTP is quite easy from any operating system. Whether it’s a Windows PC or macOS, the internet developer community has a solution for everything.
Thankfully, macOS has an in-built Terminal app that allows login SSH telnet remotely. While for Windows OS, we can use an open-source program – PuTTY.
For SFTP, we will be using a software called FileZilla that’s available for both macOS and Windows PC – it’s again Open Source Software available for Free!
You can even login locally on Android OS smartphones using a few apps available in the Google Play Store. However, in this post, we will be focusing on login SSH and SFTP on Windows OS or macOS only.
Also, if you’re following our #CloudServer Series, then this is the second article and video demo (added further down below) on SSH and SFTP connection setup.
If not, then check out our previous post on creating an Ubuntu cloud server on DigitalOcean.
Let’s start off with SSH first —
What is SSH?
According to TechTarget,
SSH, also known as Secure Shell or Secure Socket Shell, is a network protocol that gives users, particularly system administrators, a secure way to access a computer over an unsecured network.
So basically, as a Ubuntu Server owner, we will be accessing our Cloud Server which is hosted at a different part of the world remotely using SSH from our home computer. SSH acts as a secured gateway and bridge which authenticates and sends encrypted data communication between two systems.
In our case, we will be using the SSH tunnel to run command scripts for making changes to the system and software at the administrative level. We will be installing, removing, deleting and managing the entire virtually hosted server using SSH.
While SSH client can not access the files or perform data transfer, hence we need an SFTP client to do the same.
Login SSH with MacOS Terminal App
While Windows does not have any built-in support, we have Mac OS that has Terminal App which allows to remote SSH connection.
In order to log in via SSH connection, you need to have:
- IP Address of the Ubuntu Cloud Server
- Username – default is root
- One Time Password
All these 3 information you might have already received in the mailbox when you spin a new droplet on DigitalOcean. Check out the video demo below for more information.
Now let’s follow the steps to connect and login SSH using the Terminal App:
- Open the Terminal App on macOS
- From the Menu bar, open Shell options list and select New Remote Connection
- This will open a new window for New Remote Connections Service – select the Secure Shell (ssh) from the list
- Hit on the + in Server section to add the Cloud Server IP Address in the list and press OK command
- Now in the User field enter the username as root and finally hit on Connect command button
- A new window with a remote SSH connection will open asking to enter the password – just copy and paste the one time password received in your mailbox
- Since we are signing in for the first time using the One Time Password (OTP), the Server will request to set a new Unix Password for future
- Enter the current UNIX Password (OTP)
- Enter the new UNIX Password
- Reenter the new UNIX Password
- That’s all, we’ve successfully logged into Ubuntu Cloud Server and manage to set a new UNIX password apart from the OTP
Now go ahead and learn how to login Ubuntu Cloud server via SFTP client. You can follow our next guide on how to install a powerful LEMP stack on Cloud Server.
Login SSH with PuTTY on Windows PC
Login SSH in Windows PC is similar to what we did for Mac OS earlier. But, Windows does not have the built-in program to allow remote connection, hence will be using PuTTY.
If you’re using the Mac OS and followed the above-mentioned steps, you can skip this section or continue to read for informational purposes.
As mentioned earlier, the PuTTY is a tiny open-source program that helps to enable the SSH capability in Windows OS.
Firstly, download the latest stable version of PuTTY from its official site, then we will see how to use PuTTY for SSH connection.
- Download and Open PuTTY in Windows PC (no installation required)
- Enter the IP Address of your Ubuntu Cloud Server; the IP of my server is 220.127.116.11
- Enter the SSH Port as 22
- Set the Connection Type as SSH
- Hit on Open command button on the PuTTY window
- For the first time, it will open the SSH Host Key Fingerprint which will be saved locally and used for authenticating future SSH connections
- Just hit on Yes command button to allow the secured connection
- A blank screen with login username is requested, enter the login name as root and hit Enter button
- Next, it will request the password – enter the One Time Password that you’ve received in your email box from DigitalOcean after creating the droplet
- The password is not visible while typing in the PuTTY client
- Tip – you can copy the password from mail and paste using the mouse right-click button
- You’ll be asked to enter and confirm new root password; the password we used the previous step was valid for the first-time login only
- That’s it, you’ll be logged into your Cloud Server successfully
The new password that you’ve set up in step #10 is now your root login password in the future. You can easily access the droplet via SSH using the same.
In order to reboot Ubuntu Cloud server just enter below command in PuTTY Terminal
Moving on to SFTP —
What is SFTP?
Secure File Transfer Protocol(SFTP) is a secure version of File Transfer Protocol(FTP), which facilitates data transfer over SSH connection. Hence, SFTP is also known as SSH File Transfer Protocol.
Using SFTP client, you can connect and access the files and folders located in your Cloud Server. The SFTP help in adding, modifying, deleting and managing entire files remotely.
You can even download the file in your local system, modify per needs, and upload it back into the cloud server. All the changes made using SFTP are practically updated in real-time.
I personally use FileZilla SFTP client which is available for Windows PC as well as macOS.
Remotely Login SFTP with FileZilla Software
SFTP client makes life easier for the server administrators.
You can access the cloud server files just like your local hard disk files, and make changes using favorite editors like Notepad++, VS Code, Sublime Text, etc.
I recommend using FileZilla SFTP client which you can download on their official website. FileZilla is free and open-source software, and it’s developer actively release the update. For macOS users, it also supports the dark mode!
On download, you need to install the application on Windows or Mac OS like any other software installation.
Follow the steps to login SFTP using FileZilla Client software:
Assuming you’ve already installed the software. The steps are almost the same for Windows PC and Mac OS.
- Open the FileZilla Software and Hit on the Host command button
- A new window will open, hit on New Site command button
- Give a name to the New Host say suppose DEMO
- From the Protocol drop-down select the SFTP – SSH File Transfer Protocol
- Next, Enter the Host Address i.e. your Server IP Address
- Enter the SFTP connection Port number as 22
- Next, select the Logon Type as Normal and User as root
- Enter the root UNIX password that we have set up during the first-time login into SSH
- Hit on the OK command button to add the new site host into the list
- The new site host is added into FileZilla software
- Now to access the Ubuntu Cloud via SFTP, open the newly created site host i.e. DEMO and hit on Connect button
- Allow the host server key to saving in the computer by selecting the checkbox “Always trust this host, add this key to the cache” and hit on OK command button – for the first time login only
- That’s it, you will now be able to see and navigate through all the Ubuntu Cloud Server files and even data transfer using the FileZilla SFTP client
Login SSH and STFP Client Video Demo
Watch the video demo of how to login SSH using macOS terminal, and later part step by step procedure to login into STFP FileZilla client to remotely access the server files and directories.
Hope you liked the video, please subscribe to our channels for the next videos.
What’s next in the #CloudServer Series?
After learning how to login SSH and use SFTP in this article, next we will learn how to install the LEMP stack on Ubuntu Cloud Server and also make the best possible configuration.
Going forward, we will be using the same UNIX username and password to manage our Ubuntu Cloud Server remotely.
If you've any thoughts on Login SSH and SFTP remotely with Password into Cloud VPS, then feel free to drop in below comment box. If you find this article helpful, please consider sharing it with your network.
Also, please subscribe to our restoreBin YouTube channel for helpful videos.