0

I have two computers:

  1. an laptop running windows 10, it is added to a domain
  2. an desktop running ubuntu 16.04, it is not added to any domain

Both computers are connected to the same intranet using Ethernet socket next to each other.

However, (from computer 1) when I tried to ssh into computer 2 using its hostname, it could not connect. But when I tried to ssh using computer 2's ip address, I am able to connect to it.

What could be the cause? How to configure to make ssh-via-hostname work?

2 Answers 2

0

The issue would be that DNS resolution is not set up for the system you are SSH'ing to.

1
  • If I add computer 2 to same domain as computer 1, will it work? (The domain is a company domain, windows) Commented Mar 12, 2018 at 19:06
0

You need to register your Ubuntu 16.04 within your DNS server. Then you'll be able to use the host name to connect to it.

6
  • If I add computer 2 to same domain as computer 1, will it work? (The domain is a company domain, windows) Commented Mar 12, 2018 at 19:06
  • @user8328365, Adding a machine to the domain should work, as a Windows domain (AD) is dependent on DNS. That being said, adding an Ubuntu Server to a domain is easier said than done. Commented Mar 12, 2018 at 19:29
  • Good to know. Yes, at first I looked at the instruction about adding Ubuntu to windows domain. It requires moderate amount of configuration. Therefore I come here to confim this effort will achieve my goal. Commented Mar 12, 2018 at 20:33
  • @user8328365, you don't really need to do this though. You can just go into the DNS configuration on the server and add this host's name and IP address. Commented Mar 12, 2018 at 20:38
  • I fear that the IP of computer 2 might change and then I could not ssh into it. By the way, if A computer is connected via network port using ethernet cable (not wifi), is it possible their IP may change after restarting? Commented Mar 13, 2018 at 1:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.