How to Enable Command History for root accessing via ssh?

Status
Not open for further replies.

bollar

Patron
Joined
Oct 28, 2012
Messages
411
I'm sure this is a noob/faq question, but I can't figure out what search terms here or in FreeBSD will give me the answer.

I'd like to have command history enabled when the root user accesses Freenas by ssh. Somehow I have enabled this on one of my boxes, but not the other.

Both roots have /bin/csh selected as the shell in GUI and have identical .cshrc files, which indicate history is enabled if tcsh is selected. I have confirmed both are using csh using $SHELL. Changing the shell to tcsh from the GUI doesn't seem to enable history.

The box that supports history has a .history file, as you would expect.

So, I have to figure that the answer is obvious... To one of you...
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Bollar,

This is more of a FreeBSD type question, but depending on the shell, for BASH it would be something like:

export HISTSIZE=500

Try a google search for the shell you want and "history".
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
So, the answer to this was painfully simple. Enabling write on the USB (yes, I know, not recommended) allowed the settings to function properly.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Oh. Yeah, you should create a separate root user with a home directory on your pool if you want that to work "safely".
 
Status
Not open for further replies.
Top