TheGrandWazoo / freenas-proxmox

ZFS over iSCSI to FreeNAS API's from Proxmox VE
MIT License
236 stars 42 forks source link

Add support for alternate FreeNAS SSH Port? #132

Closed surfrock66 closed 1 year ago

surfrock66 commented 1 year ago

As a hardening step, I run non-standard SSH ports. I was able to do the key exchange and everything successfully over my alt port, but I am getting failure when actually trying to mount my storage:

command '/usr/bin/ssh -o 'BatchMode=yes' -i /etc/pve/priv/zfs/10.xx.xx.xx_id_rsa root@10.xx.xx.xx zfs list -o name,volsize,origin,type,refquota -t volume,filesystem -d1 -Hp sr66-nas-v01/sr66-vm-01' failed: exit code 255 (500)

Pretty obvious, the command doesn't support a non-standard port. Would it be possible to support that? If I just modified that command with -p and my port, could I run it manually, and it'd operationally work, or does it need constant ssh communication which would break down with a non-standard port?

jine commented 1 year ago

Edit your ~/.ssh/config file for the user (root?) running that command should be enough..

add


Host 10.x.x.x
    Port 1337

Or similar to it, and it should work just fine.

TheGrandWazoo commented 1 year ago

Thanks. Was not sure if it was embedded in the Proxmox VE code or you could do what you mentioned above. Have not had time to check due to doing taxes.

jine commented 1 year ago

As it's using the "default" SSH-command, it should work - i have not tested it my self... but if setting it in ~/.ssh doesn't work - /etc/ssh/ssh_config should do the trick for overriding the port, if if doesn't read the ~/.ssh config ! :-)

surfrock66 commented 1 year ago

This worked, and I am super appreciative. I am very excited to start using this!