Editing Sftp chroot configuration
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
== Configuration == | == Configuration == | ||
Line 20: | Line 18: | ||
[[ChrootDirectory]] [[%h]] | [[ChrootDirectory]] [[%h]] | ||
ForceCommand [[internal-sftp]] | ForceCommand [[internal-sftp]] | ||
− | + | AllowTCPForwarding no | |
X11Forwarding no | X11Forwarding no | ||
Line 44: | Line 42: | ||
=== 4) [[Create a new user account]] === | === 4) [[Create a new user account]] === | ||
[[useradd --create-home]] USERNAME | [[useradd --create-home]] USERNAME | ||
− | + | su - USERNAME | |
[[mkdir -p]] ~/[[.ssh]] | [[mkdir -p]] ~/[[.ssh]] | ||
[[chmod]] og-rxw [[~]]/.ssh | [[chmod]] og-rxw [[~]]/.ssh | ||
Line 56: | Line 54: | ||
[[sshd -t]] | [[sshd -t]] | ||
− | [[systemctl restart | + | [[systemctl restart sshd]] |
== Logs == | == Logs == | ||
Line 67: | Line 65: | ||
See also: <code>[[LogLevel]]</code> | See also: <code>[[LogLevel]]</code> | ||
− | == Related | + | == Related commands == |
* <code>[[useradd]] -m USERNAME</code> | * <code>[[useradd]] -m USERNAME</code> | ||
− | |||
== See also == | == See also == |
Advertising: