Tuesday, March 24, 2015

Create SFTP User in Linux



1 => Create a folder which you want to share with sftp

#mkdir /opt/lampp/htdocs/nirmal

2 => Create a user to allow as a sftp user

#useradd -d /opt/lampp/htdocs/nirmal nirmal

# passwd nirmal
Enter new UNIX password: 123
Retype new UNIX password: 123
passwd: password updated successfully

 #chown nirmal:nirmal -R /opt/lampp/htdocs/nirmal

 
3 => Now sftp user created check it by below given command from client system

#sftp nirmal@192.168.1.100
The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
ECDSA key fingerprint is bd:d1:10:33:31:04:14:83:b2:8d:1b:ef:97:fc:b2:67.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.100' (ECDSA) to the list of known hosts.
nirmal@192.168.1.100's password:
Connected to 192.168.1.100.
sftp> pwd
Remote working directory: /opt/lampp/htdocs/nirmal
sftp> mkdir a
sftp> ls
a
sftp> exit


4 => Now go on server and check created directory available or not

#ls -l /opt/lampp/htdocs/nirmal/
total 1drwxrwxr-x 2 nirmal nirmal 4096 Mar 24 17:22 a



5 => Now your sftp is working fine

6 => Go on client and install filezilla to access sftp graphically .

#apt-get install  filezilla



##################### Enjoy #####################

No comments:

Post a Comment

Installing Jenkins on RHEL 8 is a straightforward process. Here's a step-by-step guide

Introduction  Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD) pipelines...