BassT23 / Proxmox

Update your Proxmox VE
Other
143 stars 8 forks source link

Feature Request - non standard ssh port #116

Open yagler opened 4 months ago

yagler commented 4 months ago

It would be nice to have the ability to define a custom ssh port.

Right now when I run the "update -up" command I get the following error:

ssh: connect to host port 22: Connection refused scp: Connection closed

An ssh connection might look something like this where server1 is the server name and 1234 is the port

ssh server1 -p 1234

BassT23 commented 2 months ago

pls try out latest development version with update develop -up

port can be set in /etc/ultimate-updater/update.conf

yagler commented 1 month ago

Hi BassT23, sorry for the delay. I tried this out last week, but it didn't seem like it was working so I set it to the side until I could take another look.

I think I wasn't able to use "update develop -up" I ended up using "upgrade -up"

I then changed the 16th line of /etc/ultimate-updater/update.conf I didn't screenshot to start, but the line is now: SSH_PORT="1234" # default =22

I didn't make any other manual changes to the file.

When I run update, I still get --- Check Status for Welcome-Screen --- ssh: connect to host <> port 22: Connection refused --- Finished check ---

It seems like it isn't taking the port configuration properly. Let me know if you have any suggestions.

Thanks, Yagler.

BassT23 commented 1 month ago

What is your output for update status ?

yagler commented 1 month ago

The output for 'update status' is:

 https://github.com/BassT23/Proxmox

The <> for Proxmox VE

Last modification (on GitHub): 2024-05-10T13:48:35Z

Version overview Updater: 4.1 Extras: 1.8.5 Config: 1.3.3 Welcome: 1.3.7 Check: 1.4.8

ssh: connect to host <> port 22: Connection refused scp: Connection closed

But when I first sign in it shows the following details: OS: Proxmox VE 8.2.2 x86_64 Kernel: 6.8.4-3-pve Uptime: 2 days, 13 hours, 15 mins Packages: 787 (dpkg) Shell: bash 5.2.15 Terminal: run-parts CPU: Intel i7-4770K (8) @ 3.900GHz GPU: Intel HD Graphics Memory: 3922MiB / 7812MiB

   The Ultimate Updater is UpToDate
          Version: 4.1

 Last Update Check: 2 minute(s) ago

Available Updates: S = Security / N = Normal Host : <> S: 2 / N: 2 LXC 101 : <> S: 1 / N: 1

Linux <> 6.8.4-3-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-3 (2024-05-02T11:55Z) x86_64 Last login: Fri May 10 10:07:58 PDT 2024 on pts/0

Let me know if I can provide more details. Thanks, Yagler.

BassT23 commented 1 month ago

For special ssh port you need latest develop version (4.1.2 or up)

If you want, pls test with update develop -up - then update status should show v4.1.2 Then the setting in /etc/ultimate-updater/update.conf should work - hopefully :)

yagler commented 1 month ago

Hi BassT23, here is the output of "update status":

Last modification (on GitHub): 2024-05-12T18:02:41Z

  Version overview (develop)
  Updater: 4.1.5
  Extras:  1.8.6
  Config:  1.3.3
  Welcome: 1.3.7
  Check:   1.4.8

I realize that my request as not as full featured as my current setup would require. This is my first attempt at a home lab setup with Proxmox and I would say I'm definitely learning, but have a long ways to go.

My initial setup followed some ssh guide(s) that recommended disabling ssh for the root account and only allowing certain accounts to do ssh. I think I only have ssh configured on the root node and it can only be done with 1 specific non-root account on 1 non-standard port.

It would be cool if the configuration file could also have the ability to set the user account that would be used for the ssh connection. I would be willing to set up the same account with ssh for each of the VM's/containers if that would allow the updater to work better. I could also temporarily allow ssh for root to test this out, but I have really been trying to get to installing nextcloud through an nginx proxy (I know I'm making things extra hard to start with).

As is, I do still really appreciate the ultimate updater. Even with the SSH errors it still seems to give indication of available updates when I first sign in and applies them with the update command even with errors.

I still haven't dug into either of these for a VM error I see on one of the VM's (that doesn't have ssh configured): For ssh (harder, but nicer output), check this: https://github.com/BassT23/Proxmox/blob/develop/ssh.md For QEMU (easy connection), check this: https://pve.proxmox.com/wiki/Qemu-guest-agent

Thanks again for your efforts to get the ultimate updater working more smoothly for my weird setup. Yagler