Installing Putty Software and Testing Connections
In this article, I am going to discuss Installing Putty Software and Testing Connections. Please read our previous article where we discussed How to Connect to Oracle Database.
Installing Putty Software and Testing Connections
We are going to discuss the installation of putty software. This software will enable us to connect to the server remotely. In real-life scenarios, most of the time the DBAs will be using putty to manage the oracle database. So, it is not necessary to be on the same machine or server machine. Let us learn the steps of installation of putty software.
Step1: Open the virtual machine and login into the server using the oracle user. After logging in successfully minimize the virtual machine and then open google chrome or any web browser and then search for “putty software download”
Step2: After getting the search results, search for the below website where the putty is available. There are many other websites but we are using this website for putty download.
Step3: After clicking on the above website, you will find the results of the putty software download. Scroll down a bit and you will find the below column and look for 64-bit putty.exe(x86).
Step4: Right Click on Putty.exe and click on the save link as. After clicking the save link as it will prompt for the location where you need to save. You can give any location and save it.
After Clicking save, the putty will be downloaded to your computer.
Step 5: Open the putty software and below will be the interface of the putty software. There is an empty box called hostname where you need to enter the hostname or IP address of your Linux virtual machine.
Step6: Go to the Linux machine and open the terminal and enter the command “ifconfig”. After entering the command “ifconfig” you will get the below results. Copy the IP Address and paste it into the putty.
Paste the IP Address in the putty session.
Leave the other settings as it is and click open. After Clicking open you will get a small dialog box. Click Accept.
Step7: It will prompt for user login details. You need to mention oracle user and enter the password for the user oracle.
After entering the credentials, you are now connected to the server remotely. We will verify that by creating a file.
Go to the Desktop folder and create a folder of any name. I have created a folder using the name “jaya” after creating the folder go inside the folder jaya and then create a sample file using the command “touch filename”. I have created the file xyz.txt. Now open the Linux machine and open files and go inside the folder where you have created. Now you will be able to see the file that you have created in putty.
So, this is one of the methods that we connect to the server using putty. There is another method to connect to the server using putty by providing the hostname.
Connecting to Putty using Hostname:
Step1: Go to the virtual machine and open the terminal and run a command to get the hostname.
Step2: Copy this hostname and paste it into the putty session and click open.
You will be getting an error as below. This indicates that the hostname that you have entered is not recognized by the computer that you are currently using. Follow the next process to overcome this error. We need to update the host file on the windows computer.
Step3: Open Task Manager on your computer.
Step4: Click on File and click on Run New Task
Step5: After clicking on Run New Task. You will get a popup as below. Enter notepad and checkbox the “Create this task with administrative privileges”. Click Ok.
Step6: After Clicking Ok a notepad will open. Click on File and click on Open.
Step7: You will get a popup for selecting a file where you need to select the host file to make changes. Go to this location. “C:\Windows\System32\drivers\etc”. In the below select file type as All files. After selecting this option, you will be able to see the host file.
Step8: Select the host file in the below list and Click Open.
Step9: After Opening the host file go to the bottom of the file. You will find the old hostname. Delete the old hostname and you need to enter the hostname and IP Address of your machine.
Step10: Enter the IP Address and the hostname as below. After entering the IP Address and the hostname click save.
Step11: Now try to open the Putty using the hostname. You will be connected.
You will get a small popup. Click on Accept and you are good to go. You will be connected to the virtual machine using the hostname.
After logging in it prompts for a username and password. Login using the oracle user and the password.
Note: While logging into the putty session make sure the internet is working and the Linux machine should be running. If the Linux machine is not running you cannot connect to the server.
In the next article, I am going to discuss Installing Winscp Software and Transferring Files. Here, in this article, I try to explain Installing Putty Software and Testing Connections and I hope you enjoy this Installing Putty Software and Testing Connections article.
About the Author: Pranaya Rout
Pranaya Rout has published more than 3,000 articles in his 11-year career. Pranaya Rout has very good experience with Microsoft Technologies, Including C#, VB, ASP.NET MVC, ASP.NET Web API, EF, EF Core, ADO.NET, LINQ, SQL Server, MYSQL, Oracle, ASP.NET Core, Cloud Computing, Microservices, Design Patterns and still learning new technologies.