How to configure SFTP to login in the "/" directory?
45,391
Warning: This method might be unsafe for server users.
Ubuntu doesn't allow root user and also login in ssh as root by default.
So the first thing you have to do is to enable your root user account:
$ sudo passwd root
Now you have got your root account enabled now.
I am not sure whether you have installed your OpenSSH server or not.
So I will teach you how to install OpenSSH server.
$ sudo apt-get install openssh-server
Now you are able to edit the ssh config:
$ sudo vi /etc/ssh/sshd_config
Find the line contains "PermitRootLogin no", modify it to "PermitRootLogin yes".
Oh yeah, now restart the ssh server:
$ sudo service ssh restart
Now give it a try
Related videos on Youtube
Author by
Nabil
Updated on September 18, 2022Comments
-
Nabil almost 2 years
I want to login as root and make the / as the default directory in SFTP. Newbie help needed
-
Rinzwind over 10 yearsAs a friendly advice from a more experienced user: please don't and follow the standard method. It is proven to work and it is secure. You can use this as a reference: en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP
-
-
Nabil over 10 yearsThanks. I edited the /etc/passwd file to change the root's home directory..
-
z8r0 over 10 yearsevery road leads to rome,right?
-
Jastria Rahmat over 4 yearsI can confirm this works. but in my opinion, yes it is unsafe