Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 45628  / 3 Years ago, thu, june 10, 2021, 3:45:44

I have a virtualbox on which I have installed ubuntu 12.04. My host computer is Mac OS (mavericks). I did a SSH key copy to my remote (which is ubuntu server and I call it myubuntu).



when I did



ssh username@myubuntu
ssh: Could not resolve hostname ubuntuhadoop: nodename nor servname provided, or not known


but when I tried:



ssh [email protected]


I was able to log in to the remote server (which is myubuntu).



why is it need that I give IP address it connects properply but not the servername.



I am not sure if this is possible. But I found in one of youtube tutorials.
ssh myubuntu (NOT username@myubuntu)
and logged onto the remote server, without username. is this possible?


More From » networking

 Answers
4

You have a few options.



If you need access from only a few locations, or a single location, update /etc/hosts



sudo nano /etc/hosts


Add an entry for your server



66.90.115.178 myubuntu


Second, purchase or find a free DNS service, http://www.noip.com/free/ or similar.



Third, ssh uses your current user name by default, so if you have the same user name on both client and server, just ssh server_name



ssh your_server


You only need to specify a user name if the names are different or you want a new user



ssh new_user@your_server

[#24464] Thursday, June 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ingsta

Total Points: 391
Total Questions: 103
Total Answers: 124

Location: Bonaire
Member since Wed, Mar 29, 2023
1 Year ago
ingsta questions
Sun, Oct 23, 22, 01:42, 2 Years ago
Sat, Oct 30, 21, 11:27, 3 Years ago
Sun, Nov 28, 21, 12:49, 2 Years ago
;