From owner-freebsd-questions@freebsd.org Thu Mar 22 22:20:46 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7121F4E074 for ; Thu, 22 Mar 2018 22:20:46 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644236ED07 for ; Thu, 22 Mar 2018 22:20:45 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward104j.mail.yandex.net (Yandex) with ESMTP id EC22744155; Fri, 23 Mar 2018 01:20:37 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PA2Umte6Gl-KbDaJ6HW; Fri, 23 Mar 2018 01:20:37 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1521757237; bh=TEN7hHq7Dhikw9HmO40TLX+VuvY2z7Ld2UFszljCdYk=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=N5FOc3DwpBhbuj0hoPl50why6Bi0X32zelbrLYofwKzV98GOTqWmmJVt3i21zCYCK YVp7h2RHI+Y6hrCNg63qusVRd8Rx7CbWErWUoqsX4UzS4Sz41aKDHibJDH699HTGPr KcVRB/7U/OvLpxT0USO0RdmLhXE6lGguvGqJTxjk= Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id r5Vkg1e9Hp-KZvaVNPH; Fri, 23 Mar 2018 01:20:36 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1521757237; bh=TEN7hHq7Dhikw9HmO40TLX+VuvY2z7Ld2UFszljCdYk=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=N5FOc3DwpBhbuj0hoPl50why6Bi0X32zelbrLYofwKzV98GOTqWmmJVt3i21zCYCK YVp7h2RHI+Y6hrCNg63qusVRd8Rx7CbWErWUoqsX4UzS4Sz41aKDHibJDH699HTGPr KcVRB/7U/OvLpxT0USO0RdmLhXE6lGguvGqJTxjk= Authentication-Results: smtp2j.mail.yandex.net; dkim=pass header.i=@yandex.com Subject: Re: how to set hostname on a cable line? To: Polytropon , freebsd-questions@freebsd.org References: <201803211834.w2LIY9Jh059885@jail0199.vps.exonetric.net> <79cc198c-daa9-1cb2-020f-d11d7d3d396a@yandex.com> <20180321213005.GA73927@jail0199.vps.exonetric.net> <20180321232254.3a2dc696.freebsd@edvax.de> <20180322121320.GA66012@jail0199.vps.exonetric.net> <86e6405e-a0e0-8d9c-c363-b6537ef4ed8d@yandex.com> <20180322214416.GB15614@jail0199.vps.exonetric.net> From: Manish Jain Message-ID: <39f5bbec-a505-2712-34a8-9a22f9000bf8@yandex.com> Date: Fri, 23 Mar 2018 03:50:22 +0530 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180322214416.GB15614@jail0199.vps.exonetric.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 22:20:47 -0000 On 03/23/18 03:14, Anton Shterenlikht wrote: > On Thu, Mar 22, 2018 at 08:42:26PM +0530, Manish Jain wrote: >> On 03/22/18 17:43, Anton Shterenlikht wrote: >>> No matter what I put there, >>> ssh `hostname` will not work, because >>> my randomly chosen hostname will not resolve to my IP! >> >> Hi Anton, >> >> I suppose you have already tried something like this, but I just wanted >> to be sure: can you not 1) put fqdn in rc.conf; and then 2) put the IP >> for the machine's fqdn in /etc/hosts on the box that needs to ssh ? > > That did it, thanks! > > Sorry for being so dumb. > > I never need to dial into this laptop from outside, > so this is all I need. As somebody else suggested, > I'll probably need to pay for a better service, > which will include some DNS if I need a proper FQDN. > > Thanks again > > Anton > I am glad that it worked for you. But I felt rather dumb that I realized very late your host name is randomly generated, possibly upon each boot. -- Tx and Regards, Manish Jain