I can log in to ssh because I still asked for my publickey password and successfully logged in
.but not when scp transfers files
commands executed by the local root
scp-r-p $SERVERPORT $ROOTDIR $SERVERUSERNAM@$SERVERIPV4:/home/$SERVERUSERNAME/Documents/scripts
display
transfer file
root@192.168.27.150"s password:
Permission denied, please try again.
root@192.168.27.150"s password:
Permission denied, please try again.
root@192.168.27.150"s password:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
ordinary user executes the command
su-$CURRENTUSER-c "scp-r-p $SERVERPORT $ROOTDIR $SERVERUSERNAM@$SERVERIPV4:/home/$SERVERUSERNAME/Documents/scripts"
Show
transfer file
Host key verification failed.
lost connection
root is disabled on the server, and
has been modified
PermitRootLogin no
DenyUsers root
PermitEmptyPasswords no
IgnoreRhosts yes
HostbasedAuthentication no
ask for your help, thank you.