Error on trying to add SSH public key to a user via webgui

  • Hello, I have SSH working fine for months on various OMV machines.


    I wanted to add a second public key to a user for use with rsync. I got the same error on two machines, one an AMD64 box and one a RaspberryPi 3 - both running OMV5.


    On trying to apply the changes I get a long error - can anyone help me decipher this?:

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run ssh 2>&1' with exit code '1': /usr/lib/python3/dist-packages/salt/utils/decorators/signature.py:31: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly *salt.utils.args.get_function_argspec(original_function) debian: ---------- ID: remove_ssh_authorized_keys Function: file.directory Name: /var/lib/openmediavault/ssh/authorized_keys Result: True Comment: Files cleaned from directory /var/lib/openmediavault/ssh/authorized_keys Started: 00:25:27.755780 Duration: 1.512 ms Changes: ---------- /var/lib/openmediavault/ssh/authorized_keys/myusername: ---------- removed: Removed due to clean removed: - /var/lib/openmediavault/ssh/authorized_keys/myusername ---------- ID: create_ssh_authorized_key_file_myusername Function: file.managed Name: /var/lib/openmediavault/ssh/authorized_keys/myusername Result: True Comment: File /var/lib/openmediavault/ssh/authorized_keys/myusername updated Started: 00:25:27.757405 Duration: 2.346 ms Changes: ---------- diff: New file user: myusername ---------- ID: create_tmp_pubkey_file_myusername_1 Function: file.managed Name: /tmp/tmpzbwfhxdr Result: True Comment: File /tmp/tmpzbwfhxdr updated Started: 00:25:27.759858 Duration: 25.691 ms Changes: ---------- diff: --- +++ @@ -0,0 +1,9 @@ +---- BEGIN SSH2 PUBLIC KEY ---- +Comment: "rsa-key-20190118" +AAAAB3NzaC1yc2EAAAABJQAAAQEA2V57GdjZF3ypQuOKQ9zObejNXKQYkIfVu2eQ +SxItL1o/5qHK2EAIVdHMUp8pBoOZAc7wBa7gDvhhPGhClBsaC73rWq+p2ntbUFVj +DVmamtGaOyTiS79mtQ/AzIZJO16k9QvfeelAKaj6XkAO5ZFh7VYtYDQDWu5wvyWy +TS67X9dILiSm9U2IbbZQZxvmfAKznVLGU21e7FDjUpIvvabFmWKxUjddlUXXXUCv +ZMibDtXtU1FsEbCuFGYjvo3d4uqwcZK1izSSSAGf0+f6YgxVm2vdKWpaA8BJVMfY +I8ykYNLMPkLddAs8SNtT91Xo108Z7tAhIGA3dJJ+GbTuoH+pGQ== +---- END SSH2 PUBLIC KEY ---- ---------- ID: append_ssh_authorized_key_myusername_1 Function: cmd.run Name: ssh-keygen -i -f '/tmp/tmpzbwfhxdr' >> '/var/lib/openmediavault/ssh/authorized_keys/myusername' Result: True Comment: Command "ssh-keygen -i -f '/tmp/tmpzbwfhxdr' >> '/var/lib/openmediavault/ssh/authorized_keys/myusername'" run Started: 00:25:27.786159 Duration: 22.557 ms Changes: ---------- pid: 3281 retcode: 0 stderr: stdout: ---------- ID: remove_tmp_pubkey_file_myusername_1 Function: file.absent Name: /tmp/tmpzbwfhxdr Result: True Comment: Removed file /tmp/tmpzbwfhxdr Started: 00:25:27.809399 Duration: 1.746 ms Changes: ---------- removed: /tmp/tmpzbwfhxdr ---------- ID: create_tmp_pubkey_file_myusername_2 Function: file.managed Name: /tmp/tmpp2_vmk6h Result: True Comment: File /tmp/tmpp2_vmk6h updated Started: 00:25:27.811506 Duration: 8.279 ms Changes: ---------- diff: --- +++ @@ -0,0 +1,6 @@ +---- BEGIN SSH2 PUBLIC KEY ---- +Comment: "rs-key" +AAAAB3NzaC1yc2EAAAADAQABAAAAYQDOUxjgVJOyRf/9WeEBfPL567d9wy0HFYfe +VILVQo69Mk/MW3s9HUzUPgyp/LlTNTzgaKxouTpt56SpMWhc3bGASZ8PTSMAljg4 +50YVeKESGFbuAa+VCyvElpInwcT02ec= +---- END SSH2 PUBLIC KEY ---- ---------- ID: append_ssh_authorized_key_myusername_2 Function: cmd.run Name: ssh-keygen -i -f '/tmp/tmpp2_vmk6h' >> '/var/lib/openmediavault/ssh/authorized_keys/myusername' Result: False Comment: Command "ssh-keygen -i -f '/tmp/tmpp2_vmk6h' >> '/var/lib/openmediavault/ssh/authorized_keys/myusername'" run Started: 00:25:27.820174 Duration: 12.931 ms Changes: ---------- pid: 3283 retcode: 255 stderr: decode blob failed: Invalid key length stdout: ---------- ID: remove_tmp_pubkey_file_myusername_2 Function: file.absent Name: /tmp/tmpp2_vmk6h Result: True Comment: Removed file /tmp/tmpp2_vmk6h Started: 00:25:27.833308 Duration: 0.507 ms Changes: ---------- removed: /tmp/tmpp2_vmk6h ---------- ID: configure_ssh_sshd_config Function: file.managed Name: /etc/ssh/sshd_config Result: True Comment: File /etc/ssh/sshd_config is in the correct state Started: 00:25:27.833923 Duration: 35.578 ms Changes: ---------- ID: start_ssh_service Function: service.running Name: ssh Result: True Comment: The service ssh is already running Started: 00:25:27.878126 Duration: 58.484 ms Changes: Summary for debian ------------ Succeeded: 9 (changed=8) Failed: 1 ------------ Total states run: 10 Total run time: 169.631 ms

    OMV 4 and 5 on Raspberry Pi 3, Odroid C2 and HC2, HP Proliant N36L and N54L, and another cobbled together box. Snapraid on the latter 3.

  • OK, think I've sorted this, I was trying to add a short 768bit key.


    I made a new 2048 bit key and seems to have worked.


    So I guess minimum key length requirements changed since I made the original shorter key.

    OMV 4 and 5 on Raspberry Pi 3, Odroid C2 and HC2, HP Proliant N36L and N54L, and another cobbled together box. Snapraid on the latter 3.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!