safer, of course. shell in a remote car under the name of a " good " user, and there's already increased privileges (with the help of a " good " ) sudo or, at worst, su() For processes launched in a remote car.It is understandable that if if a file system is installed, it is not possible to make such an upgrade of privileges: sshdwhich is " responsible " for mounting on the " side " is launched and operated on behalf of the user under which you connected to the deleted car.It is therefore much less safe, but " if you want so much " , then (technically) it is possible to connect immediately under the name of a privileged user (i.e., root-a).Please write your public key to the relevant user file root in a remote car:Copy your public key on the remote car. id_rsa.pub$ scp ~/.ssh/id_rsa.pub пользователь@удалённая-машина:/tmp/мой.ключ
Then create a catalogue:у.м.$ sudo mkdir -p /root/.ssh
Add (ibid.) a copy key to the file. authorized_keys:у.м.$ cat /tmp/мой.ключ | sudo tee -a /root/.ssh/authorized_keys
and change the ownership and access rights of the catalogue:у.м.$ sudo chown -R root:root /root/.ssh
у.м.$ sudo chmod -R go= /root/.ssh
Now you can mount catalogues: on your local car, the process. sshfs on your behalf, and on the remote process sshd to be implemented on behalf of root-a:$ sshfs root@удалённая-машина:/ ~/локальный/каталог
I'll let you edit files in this catalogue (e.g., ~/локальный/каталог/etc/sysctl.conffree from any type of error:The document could not be saved