# config sudo, if you cannot open it or save it, please use root user open "sudoers" file sudo vim /etc/sudoers # add line like that # XXX ALL=(ALL) NOPASSWD: ALL
# if your user shell is not bash, please change this line sudo vim /etc/passwd # modify /bin/sh to /bin/bash # XXX:x:1002:1002::/home/XXX:/bin/sh # -> # XXX:x:1002:1002::/home/XXX:/bin/bash
# login XXX sudo su XXX
# to ~ folder, if don't have /home/XXX, please make dir by youself cd ~
# create .ssh sudo mkdir .ssh
# create key file sudo vim authorized_keys # copy you public key in it # public key like that: ssh-rsa AAAA...