Install And Configure SFTP Kodekloud



Some of the developers from Nautilus project team have asked for SFTP access to at least one of the app server in Stratos DC . After going through the requirements system admins team has decided to configure SFTP server on App Server 3 server in Stratos Datacenter . Please configure it as per below given instructions:

a. Create an SFTP user ravi and set its password to 8FmzjvFU6S .

b. Password authentication should be enabled for this user.

c. Set its ChrootDirectory to /var/www/app .

d. SFTP user should only be allowed to make SFTP connections.


Solution: Login to mentioned server in question

ssh [email protected]

Then Login as root

sudo su

Then add user and password

useradd ravi

passwd ravi

Next create mentioned directory and make the new user owner of that directory

mkdir -p /var/www/app

chown ravi:ravi /var/www/app

Also make root as the owner  and take permissions

chown root:root /var/www

chmod -R 755 /var/www

chmod -R 755 /var/www/app

chown -R ravi /var/www/app

chown -R root /var/www/app

chown -R root /var/www/

chmod -R 755 /var/www/

Now  edit the sshd_config file as follows

vi /etc/ssh/sshd_config


Restart sshd and test

systemctl restart sshd

sftp [email protected]

ssh [email protected]



Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment


Post a Comment