I need root user in tos linux for remoge access from other device with ssh certificate-based authentication for remotely shutdown/restart tnas
I created a root user with the necessary privileges (via ssh), but tos resets root in sshd_config when the sshd service is restarted.
How to do it?
Thanx
How to add/create standard root user for ssh access.
Re: How to add/create standard root user for ssh access.
Problem solved
go to /etc/init.d
i change file ssh_service
string 19
from
sed -i "/AllowUsers/cAllowUsers $admin" /etc/ssh/sshd_config
to
sed -i "/AllowUsers/cAllowUsers $admin root" /etc/ssh/sshd_config
restart service and problem solved
go to /etc/init.d
i change file ssh_service
string 19
from
sed -i "/AllowUsers/cAllowUsers $admin" /etc/ssh/sshd_config
to
sed -i "/AllowUsers/cAllowUsers $admin root" /etc/ssh/sshd_config
restart service and problem solved
Re: How to add/create standard root user for ssh access.
But cert authenticartion from device to tnas not works
Always need password....
How to do it with tnas???
P.S. From device to esxi's hosts working perfectly
Always need password....
How to do it with tnas???
P.S. From device to esxi's hosts working perfectly
Re: How to add/create standard root user for ssh access.
Problem solved
Create user root (login to ssh with adm acc, useradd root ... , passwd root ...)
Edit /etc/passwd (root0:0:Root User,:/root:/bin/bash)
Edit /etc/group (admin3:admin,youradmin,root)
Edit /etc/ssh/sshd_config :
uncomment string HostKey /etc/ssh/ssh_host_rsa_key
uncomment string (if commented out) AuthorizedKeysFile /etc/ssh/authorized_keys
add strings
RSAAuthentication yes
PubkeyAuthentication yes
also i add string - Protocol 2
and uncomment and change string - UseDNS no
5. Edit /etc/init.d/ssh_service
change string - sed -i "/AllowUsers/cAllowUsers $admin" /etc/ssh/sshd_config to sed -i "/AllowUsers/cAllowUsers $admin root" /etc/ssh/sshd_config
or comment out the condition
#if [ ! -z "$admin" ]; then
# sed -i "/AllowUsers/cAllowUsers $admin" /etc/ssh/sshd_config
#fi
and change string
AllowUsers youradmin to AllowUsers youradmin root
restart tnas
now user root and /etc/ssh/authorized_keys is work
Create user root (login to ssh with adm acc, useradd root ... , passwd root ...)
Edit /etc/passwd (root0:0:Root User,:/root:/bin/bash)
Edit /etc/group (admin3:admin,youradmin,root)
Edit /etc/ssh/sshd_config :
uncomment string HostKey /etc/ssh/ssh_host_rsa_key
uncomment string (if commented out) AuthorizedKeysFile /etc/ssh/authorized_keys
add strings
RSAAuthentication yes
PubkeyAuthentication yes
also i add string - Protocol 2
and uncomment and change string - UseDNS no
5. Edit /etc/init.d/ssh_service
change string - sed -i "/AllowUsers/cAllowUsers $admin" /etc/ssh/sshd_config to sed -i "/AllowUsers/cAllowUsers $admin root" /etc/ssh/sshd_config
or comment out the condition
#if [ ! -z "$admin" ]; then
# sed -i "/AllowUsers/cAllowUsers $admin" /etc/ssh/sshd_config
#fi
and change string
AllowUsers youradmin to AllowUsers youradmin root
restart tnas
now user root and /etc/ssh/authorized_keys is work