ssh:: raspberrypi permission for sftp connection

 

라즈베리파이에서 기본 접속하는 계정이 root가 아닌 (pi)인 경우가 많아서, 불편할 때가 있다.

Mobaxterm 프로그램에서  sftp 권한없음으로 파일 읽기만 된다. 이는 권한문제로 수정하여 사용환경을 변경한다 

 

 

 

 

sudo mkdir -p /var/sftp/files
sudo chown $USER:$USER /var/sftp/files
sudo chmod 755 /var/sftp
sudo nano /etc/ssh/sshd_config

__________아래항목 붙여넣기____________
Match User user
    ForceCommand internal-sftp
    PasswordAuthentication yes
    ChrootDirectory /var/sftp
    PermitTunnel no
    AllowAgentForwarding no
    AllowTcpForwarding no
    X11Forwarding no
    
_________저장하고 나오기 _______________
    
    
sudo systemctl restart ssh

_

 

 

 

 

https://askubuntu.com/questions/1194686/sftp-server-permission-setup

반응형