
UC-8100-LX Software Manual
General Debian Package Usage
5-6
42B
SFTP
The default sftp is started, and the account/password is
moxa/moxa
as the same as the system
account/password. You can also configure sftp account with the following steps.
1.
Creating a user & group for the sftp access without any shell
moxa@Moxa:~$ sudo adduser sftp
[sudo] password for moxa:
Adding user `sftp' ...
Adding new group `sftp' (1003) ...
Adding new user `sftp' (1001) with group `sftp' ...
Creating home directory `/home/sftp' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for sftp
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
moxa@Moxa:~$ sudo usermod -s /bin/false sftp
2.
Then a modification to the current user made in the debian installation fase. In this example, we use ftpuser
as the user.
moxa@Moxa:~$ sudo mkdir /home/sftp/upload/
moxa@Moxa:~$ sudo chown root:root /home/sftp
moxa@Moxa:~$ sudo chown sftp:sftp /home/sftp/upload/
3.
Adapt sshd configuration
in the bottom of
/etc/ssh/sshd_config.
Subsystem sftp internal-sftp
#Subsystem sftp /usr/lib/openssh/sftp-server
Match User sftp
ChrootDirectory /home/%u
ForceCommand internal-sftp
4.
Restart SSHD Daemon:
moxa@Moxa:~$ sudo /etc/init.d/sshd restart
5.
The account and its default path are already done
NOTE
Click the following link for more information on SSH.
43B
DNS
The UC-8100-LX supports DNS client (but not DNS server). To set up DNS client, you need to edit three
configuration files:
/etc/hosts
,
/etc/resolv.conf
, and
/etc/nsswitch.conf
.
/etc/hosts
This is the first file that the Linux system reads to resolve the host name and IP address.
Содержание UC-8100-LX
Страница 8: ...UC 8100 LX Software Getting Started 2 2...
Страница 38: ...UC 8100 LX Software Manual Security On UC 8100 LX 4 2...