SFTP: Instalasi

From OnnoWiki
Revision as of 17:10, 2 November 2021 by Onnowpurbo (talk | contribs) (Created page with " 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...")
(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:

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

kemudian tambahkan script berikut dibawahnya menjadi berikut:

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

Subsystem sftp internal-sftp

tambahkan script berikut di akhir baris file konfigurasi:

  1. Example of overriding settings on a per-user basis
  2. Match User anoncvs
  3. X11Forwarding no
  4. AllowTcpForwarding no
  5. PermitTTY no
  6. 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