Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 399  / 2 Years ago, sun, july 24, 2022, 5:05:21

working on setting up a local development environment. Im pretty new to Linux. I am using Virtualbox for Ubuntu server inside of the Ubuntu Desktop I am running. After setting up port forwarding I am able to connect to it using these commands: ssh -p2222 [email protected]
or
ssh -p user@localhost.



I like to connect to it using ssh [email protected]. I understood that I would be able to do that by simply adding this line to my hostfile:
127.0.0.1 example.hostname.



The problem is, I dont know where to find this file. Where is the hostfile located on Ubuntu Desktop 14.04?


More From » ssh

 Answers
2

The file you're looking for is /etc/hosts.


[#24189] Sunday, July 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
impisaso

Total Points: 423
Total Questions: 106
Total Answers: 104

Location: Virgin Islands (U.S.)
Member since Tue, Feb 2, 2021
3 Years ago
;