Can my Linux hostname can be exposed to the CrOS for ssh from CrOS to Linux?

218 views
Skip to first unread message

CqN on ChromiumOS v78

unread,
Dec 6, 2019, 4:08:52 PM12/6/19
to Chromium OS Discussion
CrOS 78.3 running from USB.

It appears from the Cros, the Linux host xxx@penguin is not visible, as when I attempt to ssh from Cros.  It is there a way to expose the hostname or the virtual ip# to Cros?  

Or alternatively, is there a way to ssh into Linux from the host Cros?

Mike Frysinger

unread,
Dec 6, 2019, 4:28:21 PM12/6/19
to chacko...@gmail.com, Chromium OS Discussion
sorry, but it's not clear what you're trying to do.  can you please describe in more detail ?

what is "Cros" ?  what is "the Linux host" ?
-mike

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss

Keith I Myers

unread,
Dec 6, 2019, 4:31:05 PM12/6/19
to Mike Frysinger, chacko...@gmail.com, Chromium OS Discussion
If I can take a guess, I think he wants to connect to a Crostini instance from another device on the LAN

Keith I Myers
http://KMyers.me
Mobile : (305)-929-3475

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.

CqN on ChromiumOS v78

unread,
Dec 6, 2019, 4:45:00 PM12/6/19
to Chromium OS Discussion, chacko...@gmail.com
I wish to connect (ssh) to a Crostini instance from its parent ChromiumOS terminal,   not from elsewhere on the network.  I can currently ssh (as root) from the CromiumOS terminal to various hosts on my local network or outside.

Mike Frysinger

unread,
Dec 6, 2019, 4:49:07 PM12/6/19
to chacko...@gmail.com, Chromium OS Discussion
when you run Terminal, it's already inside Crostini (the default penguin container).  why do you want to ssh to Crostini from Crostini ?

the question of "how do i pass info into a ssh session" is a generic one and unrelated to Crostini/CrOS/Chrome Secure Shell (app).  you prob want to google for "ssh pass environment variable".
-mike

CqN on ChromiumOS v78

unread,
Dec 6, 2019, 5:28:13 PM12/6/19
to Chromium OS Discussion, chacko...@gmail.com
Sorry, for not being clear.

I wish to ssh from the ChromiumOS Terminal into an instance of Crostini running under the same ChromuimOS. The primary reason for doing that is I have my preferences all set up in my ChromiumOS Terminal; also I like to try things :)  The Crostini default user myname@penguin is not available from within its own ChromiumOS.

BTW, I can already try to ssh from the Crostini terminal to the same Crostini (yes, not very useful).  But the connection is refused on port 22.  I assume the same will happen, if I can locate the Crostini user path from the ChromiumOS.  But I will try to cross that when I get there :)

Mike Frysinger

unread,
Dec 6, 2019, 7:19:12 PM12/6/19
to chacko...@gmail.com, Chromium OS Discussion
i don't know what "ChromiumOS Terminal" means here.  it isn't an SSH client, it's a terminal session that connects directly to Crostini.

by default, there is only one instance of Crostini running -- that's one container in one VM.

are you manually creating multiple containers ?  multiple VMs ?  when you say "Terminal" do you actually mean "Chrome Secure Shell app" ?
-mike

CqN on ChromiumOS v78

unread,
Dec 6, 2019, 8:20:19 PM12/6/19
to Chromium OS Discussion, chacko...@gmail.com
Sorry, perhaps wrong terminology on my part.  By ChromiumOS Terminal, I meant the ChromiumOs Console that is brought up by c-a-t from within ChromiumOs.   I am only running one instance of Crostini (In v78.3, the CloudReady flavor I run, it is called Linux (Beta).

So from the CromiumOs Console (shown as chronos@localhost, as root) I can ssh to outside all the time.  I wish to ssh to the inside VM hosting Linux (crostini).  Hope that is clearer.

Mike Frysinger

unread,
Dec 6, 2019, 10:29:25 PM12/6/19
to chacko...@gmail.com, Chromium OS Discussion
Ctrl-Alt-T loads crosh

if you install Crostini, an app called Terminal is available via the launcher

if you use Chrome, penguin.linux.test will resolve to the container.  but if you don't use Chrome (because you launched a shell from crosh), i don't think that hostname will resolve.  so your only choice there is to use the IP address.

or you could use the Secure Shell app and ssh from Chrome using that.
-mike

CqN on ChromiumOS v78

unread,
Dec 6, 2019, 10:58:09 PM12/6/19
to Chromium OS Discussion, chacko...@gmail.com
Mike, thank you very much! You stayed with me patiently for so long!!

Yes, I am aware of the Terminal (BTW, for the CloudReady flavor it is Termina ;) ).  
From the crostini Terminal,
hostname -i
gives the ipaddress of penguin as 127.0.0.1 (localhost)

Yes, penguin.linux.test is what I was looking for at the beginning of this thread :)

From the crosh shell (of ChroimiumOS),
ssh myn...@penguin.linux.test    does appear to reach the crostini  !! (So it does resolve, right?)

But I get the msg,
ssh: connect to host penguin.linux.test port 22: Connection refused.  Not unexpected.

New topic:  How do I open up port22 in crostini to allow the above connection.  Yes, this may be a standard linux question, but where in crostini is the config file I may be able to change?  Thank you very much!

CqN on ChromiumOS v78

unread,
Dec 7, 2019, 1:45:58 AM12/7/19
to Chromium OS Discussion, chacko...@gmail.com
Cont'd

I found out that the sshd was not running on penguin.  I was able to start it.

Now ssh from chromeos shell did attempt to connect. :)  Progress.
What is the <myname>@penguin.linux.test default installation password?  

PS.  Correction in my earlier post.  I was wrong in "BTW, for the CloudReady flavor it is Termina".  It is actually as you said Terminal.  

Mike Frysinger

unread,
Dec 7, 2019, 1:56:52 AM12/7/19
to chacko...@gmail.com, Chromium OS Discussion
use Terminal to connect to the container to look up the info you need, and use `sudo` inside the container to set the details you want
-mike

DennisLfromGA

unread,
Dec 7, 2019, 11:38:07 AM12/7/19
to Chromium OS Discussion, chacko...@gmail.com
CqN,

Have you tried the new & improved Terminal system app?



It's much improved and has a ton of bells & whistles plus they're adding more.
~Denny

Mike Frysinger

unread,
Dec 7, 2019, 2:17:24 PM12/7/19
to Dennis Lockhart, Chromium OS Discussion, chacko...@gmail.com
your screenshot is of gnome terminal which has nothing to do with us ...
-mike

DennisLfromGA

unread,
Dec 7, 2019, 2:27:37 PM12/7/19
to Chromium OS Discussion, denny.l...@gmail.com, chacko...@gmail.com
Mike,

I may be confused but when I open the Linux (Beta) Terminal as shown in the lower left of that screenshot and then click on the 'Help' tab and choose 'About' that's what is displayed.
Maybe that's due to me having the gnome-terminal installed, maybe not but that's the terminal that opens when I select theTerminal app. Either way, it still may be a good workaround for the OP.

~Denny


On Saturday, December 7, 2019 at 2:17:24 PM UTC-5, Mike Frysinger wrote:
your screenshot is of gnome terminal which has nothing to do with us ...
-mike

Mike Frysinger

unread,
Dec 7, 2019, 3:23:03 PM12/7/19
to Dennis Lockhart, Chromium OS Discussion, chacko...@gmail.com
we don't mess with apps that people install.  gnome-terminal decided to install their shortcut using the name "Terminal".  so you aren't opening the CrOS Terminal, you're opening an arbitrary program unrelated to us.
-mike

DennisLfromGA

unread,
Dec 7, 2019, 3:43:06 PM12/7/19
to Chromium OS Discussion, denny.l...@gmail.com, chacko...@gmail.com
Mike,

Thanx for straightening me out, I know just enough to be dangerous. ;-)

I discovered my mistake shortly after I posted, which is usually the way it works for me.

Screenshot 2019-12-07 at 3.27.55 PM.png


The one on the left is the gnome-terminal and the one on the right is the Linux (Beta) Terminal, the icons would've helped a lot if I'd jus looked at them.

The Crostini Terminal is indeed the modified secure shell / hterm IIUC -

Screenshot 2019-12-07 at 3.29.02 PM.png


I apologize to everyone, especially the OP for this confusion.

I guess I didn't and still don't understand what the crbug for converting to a system app really means, I thought it would launch the system's default terminal app and I thought it was the gnome-terminal in my case. I also later discovered that the default system app launches the secure shell / hterm like before:

x-terminal-emulator - auto mode
  link best version is /usr/bin/garcon-terminal-handler

Anyway, thanx for the help,
~Denny


On Saturday, December 7, 2019 at 3:23:03 PM UTC-5, Mike Frysinger wrote:
we don't mess with apps that people install.  gnome-terminal decided to install their shortcut using the name "Terminal".  so you aren't opening the CrOS Terminal, you're opening an arbitrary program unrelated to us.
-mike

Mike Frysinger

unread,
Dec 7, 2019, 3:55:21 PM12/7/19
to Dennis Lockhart, Chromium OS Discussion, chacko...@gmail.com
i wonder if we can get UX designers to change up the colors or something to make it more obvious.  you probably aren't the only one who runs into this.
-mike
Reply all
Reply to author
Forward
0 new messages