Accessing a Jail (iocage) Using SSH

Status
Not open for further replies.

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
I am running FreeNAS-11.1-U6. Installed a new jail via /ui web, release 11.2-RELEASE-p4.

FreeNas manual 14.3.2. mentions when the jail is up there is an option to start the shell. Such option is not available on my web ui.

Also when I select <> Shell on the left menu to start a shell in FreeNas, nothing happens. Tried Firefox and Chrome. IE does not work at all. Using Windows 8.1.

What do I have to do?

Edit: Should mention that I have Pfsense firewall, but the normal FreeNas-UI is working as it always was.
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Well you can't run a newer version of FreeBSD in a jail then what the host system is running.

Please be a bit more specific in the steps you took to create the jail.
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
Thanks for pointing out the mistake. Wasn't aware of the wrong version and FreeNas installed it without error. I am updating to 11.2 and will reply soon.
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
Installed the jail with release 11.1-RELEASE-p15 and have the same problem missing the option to start shell.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I wouldn't recommend updating to 11.2 yet as it's still in RC status. I would also strongly suggest using an SSH client to connect such putty if you are on windows.
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
Too late :( Updated through the GUI from 11.1 to 11.2 and bricked the system. Have a backup so trying to clone the 11.1 system from the USB in order to save reinstalling.
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
I could not install the 11.2 FreeNAS from ISO, it would only show da0, the boot-stick, but not da1 to install the OS. It must be a BIOS-issue but it was too late in the morning and I had no guts to figure that out. I will wait till the final release of 11.2 will be available. So I cloned the USB-sticks from my backup FreeNAS-2, restored the config data and had my FreeNAS-1 within an hour back online. But I was struck when the replication tasks started to run: Over a year ago the speed of replication dropped to some 5% so what took one hour would last a day. I described the problem here https://forums.freenas.org/index.ph...d-publickey-password.57651/page-2#post-473608 and we were not able to fix it. Now it works and I am happy that by mistake I fixed that big problem.
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
So after a long night and short sleep ;) I am back to my original request to open a shell in the new GUI of FreeNAS.

Well you can't run a newer version of FreeBSD in a jail then what the host system is running. Please be a bit more specific in the steps you took to create the jail.

The first time I log in the new UI "FreeNAS-IP-Address/ui" I receive the following error: Error 201:[ENOMETHOD] Method "summary" not found in "network.general"

I read that this error is quite old and that it was promised to be fixed in the new release. I am using 11.1.

Then I created a new jail with the release 11.1-RELEASE-p15. The jail starts but the menu does not show the option "shell". Also when I select "shell" in the left menu to open shell in FreeNAS ("FreeNAS-IP-Address/ui/shell" the page does not open.

I tried this from several computers on both my FreeNAS and FreeNAS-backup, it is all the same.

I remember having experimented with iocage jails few months ago in an earlier release. I could set up jails, access them through shell. So it must have to do with the 11.1 release.

Is there anybody having the same problem and found a solution?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Are you having this error in the new UI or the old UI?
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
Are you having this error in the new UI or the old UI?

Here is how I access FreeNAS through the web GUI:

Normal UI http://192.168.1.11/account/login/?next=/
Here I am able to administer jails with shell from GUI and by SSH. The jails are located at /mnt/nas1/jails.
In this GUI I do not see the new iocage-jails.

New UI http://192.168.1.11/ui/sessions/signin
After login I get Error 201:[ENOMETHOD] Method "summary" not found in "network.general"
In this GUI I can only add or remove "new" jails located at /mnt/iocage.
I can not open a shell, thus cannot allow SSH.
I can not open a shell http://192.168.1.11/ui/shell
In this GUI I do not see the old jails.

This behaviour is on both my FreeNAS (main and backup).
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Ok that make more sense. You won't see iocage jails in the old UI and your old warden jails won't show up in the new UI, that's expected behavior. The new UI in 11.1 is FAR from complete. It is there as a preview to see what it's going to look like and it's not advisable to use it for any administration. For the time being you're going to have to administer your iocage jails from the CLI and it is highly recommended to use an SSH client and not the shell in the web UI.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Once you have all of that sorted out, SSHd needs to be enabled and allowed in from inside the jail. hint: /etc/ssh/sshd_config. ntill then you can ssh into your FreeNAS server and use iocage console <jail_name> to gain shell access without using the garbage WebUI shell interface.
 
Status
Not open for further replies.
Top