Autoriser ROOT en SFTP?

  1. nano /etc/ssh/sshd_config
  2. PermitRootLogin yes # find PermitRootLogin and change no to yes in front of it
  3. Ctrl+x , then y enter
  4. Service ssh restart

In your linux file browser like Nautilus,Nemo,PCManFM,Thunar type:

sftp://root@domain.tld:22

You will be asked for password enter it and you will be taken to /root folder. Same configuration should work with Filezilla i.e. sftp domain.tld 22

Security :
This is very dangerous configuration, I was exploited by this configuration when I started to use Yunohost for the first time.

  1. You should enable keys to login and disable password in sshd_config same way you enable PermitRootLogin
  2. You should have at least 2 keys for two different devices in case one of your device crashes.
  3. You should change port from 22 to something else in sshd_config and use this port instead of 22.
  4. You can define the ip’s which are allowed to have login access to root. This is good option if you have static ip’s.
1 Like