SFTP: Instalasi

From OnnoWiki
Revision as of 17:11, 2 November 2021 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Cara install SFTP:

sudo apt update
sudo apt install openssh-server
sudo systemctl restart ssh.service
sudo nano /etc/ssh/sshd_config

tambah kan # pada baris berikut dari:

Subsystem      sftp    /usr/lib/openssh/sftp-server

menjadi:

#Subsystem      sftp    /usr/lib/openssh/sftp-server

kemudian tambahkan script berikut dibawahnya menjadi berikut:

#Subsystem      sftp    /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp

tambahkan script berikut di akhir baris file konfigurasi:

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server
Match Group sftp_users
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home
ForceCommand internal-sftp

kemudian save atau di nano ctrl+o

sudo groupadd sftp_users
sudo usermod -aG sftp_users septian

ganti septian dengan username account ubuntu server kita

kemudian cek dengan remote berikut:

sftp septian@ipaddressubuntuserver

atau dengan filezilla

Host:ipaddressubuntuserver	
Username:septian	
Password:12345
Port:22