1 Generate key at ESXi server
You can do it yousleft for SSH sessions. For XSIBackup you have to run it first time and then check generated file xsibackup_id_rsa.pub in xsi-dir (installation folder)

/usr/lib/vmware/openssh/bin/ssh-keygen
Note: Set passphrase empty (for automation tasks like xsiBackup only)

2 copy public key from EXSI to QNAP Server

/vmfs/volumes/!DATASTORE!/xsi-dir/xsibackup_id_rsa.pub
to
/share/CACHEDEV1_DATA/homes/!SSHUSER!/.ssh/authorized_keys

Copy via ssh
scp id_rsa.pub admin@ClientIPAddress /etc/config/ssh/

Add RSA key to file
cat id_rsa.pub >> authorized_keys

https://wiki.qnap.com/wiki/SSH:_How_To_Set_Up_Authorized_Keys
3 Change SSHD config
/etc/config/ssh/sshd_config
AllowUsers admin !SSHUSER!

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys

4 Restart SSHD at QNAP
killall -HUP sshd

5 Run ssh in verbose mode
ssh !SSHUSER!@address -v

Refs:
https://serverpilot.io/docs/how-to-use-ssh-public-key-authentication
http://angrywelshcoder.blogspot.com/2013/01/setting-up-qnap-to-accept-s…

Добавить комментарий

Filtered HTML

  • Допустимые HTML-теги: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <p> <br><b><i> <img src alt height width>
  • Строки и абзацы переносятся автоматически.
  • Адреса веб-страниц и email-адреса преобразовываются в ссылки автоматически.