Deny Access to ssh and sftp and scp
· vi /etc/ssh/sshd_config
· add line to “DenyUsers” as following to the EOF
Ex: DenyUsers rasika,testuser
· Also you can Allow or Deny access to the relevant group as follows.
Ex: AllowGroups/DenyGroups [GROUP name]
·
/etc/init.d/sshd restart
Allow access to FTP
· vi /etc/vsftpd/vsftpd.conf
· Find the path of vsftpd.chroot_list
· vi /etc/vsftpd.chroot_list
· add username
· vi /etc/passwd
· change default logging path and set nologging if you don’t need to give ssh access to ftp account
· Ex: /bin:/sbin/nologin
· set permissions to that folder
· /etc/init.d/vsftpd restart
No comments:
Post a Comment