Access to a jail

gelemec

Cadet
Joined
Aug 16, 2021
Messages
4
Hello,

I'm a beginner on truenas,

I want to creater a webserver to access at some data from my house and communicate with it. For that i've create a jail with the plugin Famp installed on it but i can't access at some folder and documents in the jail. For example i want to change the index.html by my HTML site but i don't know how and where.

I've try to share the disk where is the jail but i can't access to the document on the disk.

Please, someone know how to resolve my problem ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need to enable SSH in the jail and learn to work from the console and possibly a graphical SFTP client.

SSH to your TrueNAS, then:
Code:
iocage console <your jailname>
vi /etc/ssh/sshd_config
# change the PermitRootLogin line to "yes" and remove the comment sign at the start
sysrc sshd_enable="YES"
service sshd start
passwd
# enter root password for your jail's root user

You can now login directly to your jail with SSH without going via the NAS.

Don't use root login with password if the system is exposed to untrustworthy networks. If this is all in a private LAN and you do not open up the SSH port to the Internet, I consider it OK.
We can raise the bar a bit by using public/private key authentication instead of a password. I you want to do that, just ask - but first get authentication with password running.
 

gelemec

Cadet
Joined
Aug 16, 2021
Messages
4
Thanx for ure help,

When i do "vi /etc/ssh/sshd_config" i received this message in the shell (attached image)

I can't find PermitRootLogin
 

Attachments

  • image_2021-08-16_182405.png
    image_2021-08-16_182405.png
    45.2 KB · Views: 275

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need to do the vi command after the iocage command so you are inside the jail when using vi. The search command in vi is / ... if you are not used to using vi you might try a different editor. Don't know what is on FreeBSD without installing additional packages.

And don't use the web shell. Use ssh to login to your NAS as root, then use the commands I wrote in that order.
 
Top