How to run pkg upgrade from Diagnostics → Command Prompt
-
@stephenw10: Ah, yes! It is the script from the post by @luckman212, titled “Auto update check, checks for updates to base system + packages and sends email alerts”.
-
@DominikHoffmann said in How to run pkg upgrade from Diagnostics → Command Prompt:
What is the potential downside of running the command from the GUI?
In one word : gravity
See it like this : you can potentially create the situation where you are sawing that tree branch while sitting on it.When you receive a mail from the "luckman" script, and it announces :
@DominikHoffmann said in How to run pkg upgrade from Diagnostics → Command Prompt:
curl: 8.5.0 -> 8.6.0 [pfSense]
unbound: 1.18.0_1 -> 1.19.1 [pfSense]Then you know why it says :
Some packages are part of the base system and will not show up in (pfSense GUI) Package Manager
as these two, unbound and curl, are system (FreeBSD) packages, NOT pfSense GUI packages, the ones that are shown here ;
So, this applies :
If any such updates are listed below, run
pkg upgrade
from the shell to install themWith 'shell' he means : console or SSH.
My advise : whatever happens : make sure, at any time, that you have a working console access.
If the console access works for you, chances are very great you might never need it.
The day you need console access is not the day you want to make it work first.Set up SSH access, as this is the "next best" access. SSH access can be done from the same place as where you can access the GUI. So no need to crawl in front of the pfSense device with the small USB cable, or hook up a keyboard and screen to your pfSense box.
With SSH, when login, you see (the same) this :
0) Logout (SSH only) 9) pfTop 1) Assign Interfaces 10) Filter Logs 2) Set interface(s) IP address 11) Restart webConfigurator 3) Reset webConfigurator password 12) PHP shell + Netgate pfSense Plus tools 4) Reset to factory defaults 13) Update from console 5) Reboot system 14) Disable Secure Shell (sshd) 6) Halt system 15) Restore recent configuration 7) Ping host 16) Restart PHP-FPM 8) Shell Enter an option:
Use option 13 and you'll be good.
-
@Gertjan
I'm bouncing back on your answer, because when I connect in SSH (not with the original user "admin" but mine which also has admin rights) I don't have the menu that comes back automatically, I only have this (in my Windows system)Any idea? or how to launch it manually when I'm connected via SSH?
Thanks for your help
-
You can run
/etc/rc.initial
to bring up the menu. Though some options there require the admin/root user. -
@stephenw10
Thanks for the quick reply :-) ... it actually works for me. -
@SwissSteph said in How to run pkg upgrade from Diagnostics → Command Prompt:
Any idea?
Windows has a ssh client ? [ I even don't want to know ^^ ]
Yeah, go here.
Don't worry, the site look like the something from another centry, but it host worlds most important admn on planet earth.
Putty.
It's a the best SSH client (IMHO of course). Some extra tools come with it.Run it, enter the IP of pfSense, port 22 (SSH) and save that as a favourite.
Then Connect.
The first time it will ask if you trust the device (your pfSense) : accept.
Done : connected.
Login with "root" (!) don't hassle with other created users or so, pfSense is a router firewall, not a multi user devices server type thing.
The password is the GUI password.Later on, you'll ditch the user/password login. Real ;) admins use :
-
@Gertjan said in How to run pkg upgrade from Diagnostics → Command Prompt:
It's a the best SSH client (IMHO of course). Some extra tools come with it.
I do like macOS Terminal!
-
@DominikHoffmann said in How to run pkg upgrade from Diagnostics → Command Prompt:
I do like macOS Terminal!
Me also, as well.
-
@NollipfSense @DominikHoffmann
seems very 'MSoft' to me.
Really, guys, I agree, but can I advise @DominikHoffmann to create a Mac clone to get access to its build in ssh
-
@Gertjan
yes, SSH command in a terminal session under Windows -
I come back to your answer and my answer where I said that this command worked (which is still the case).
But why doesn't this menu appear by itself? I set the original "user" "admin" to disabled and created another "admin" with another name, is that why the menu doesn't appear by itself?
I've also installed the "sudo" package, if this information helps to solve my problem.
-
@SwissSteph said in How to run pkg upgrade from Diagnostics → Command Prompt:
But why doesn't this menu appear by itself? I set the original "user" "admin" to disabled and created another "admin" with another name, is that why the menu doesn't appear by itself?
=>
@stephenw10 said in How to run pkg upgrade from Diagnostics → Command Prompt:
You can run
/etc/rc.initial
to bring up the menu. Though some options there require the admin/root user.See also : Admin Access.
-
The admin user is set to use the console menu as it's shell directly. For other users you need to add it to the tcsh config. Which can now easily be done because of: https://redmine.pfsense.org/issues/14746
For example when logged in as that user run:echo /etc/rc.initial >> ~/.tcshrc.local
Then logout and back in.Steve
-
-
No longer works in 24.03_1, this command "echo /etc/rc.initial >> ~/.tcshrc.local" had worked perfectly on 23.09.1
Should I run another command?
and every time I connect to SSH I get this message:
-
You mean in order to show the console menu for a non-admin user?
-
Yes ... let's say I'm also an adminnistrator
I only have one user (me) and I'm the administrator. Your command worked perfectly the other day and now I don't have the menu and the command doesn't work anymore
-
Ah that's interesting. I assume you have changed the admin password from the default?
And you see that after having run that command?
-
My "user" and "password" are the same as the original ones, with the addition of "before" and "after" letters and numbers.
EDIT
I confirm, I created another user with no letters like the original user and the original password and I no longer have the message shown here.
My problem is therefore with the name of my "administrator" user and its "password".
I'll have to change all that, sorry for my messages ...
-
@Gertjan said in How to run pkg upgrade from Diagnostics → Command Prompt:
Putty.
It's a the best SSH client (IMHO of course). Some extra tools come with it.Maybe if you don't have access to securecrt, which is not free. Use to be a big putty guy, and it is pretty solid.. But when your on shell to remote devices all day.. securecrt is really nice.
I haven't played with windows "native if you will" ssh client - it was always behind from when first started playing with it. I do like options, so I always install the openssh client from here.
https://www.mls-software.com/opensshd.html
They are normally pretty current on the version.
C:\>SSH -V OpenSSH_9.7p1, OpenSSL 3.0.13 30 Jan 2024