Tftp

Allikas: Kuutõrvaja
Redaktsioon seisuga 29. oktoober 2013, kell 16:18 kasutajalt Jj (arutelu | kaastöö)

tftp server

Debianis paigaldamine

# apt-get install tftpd-hpa

Konfiguratsioonifail /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"

Change root directory on startup. This means the remote host does not need to pass along the directory as part of the transfer, and may add security. When --secure is specified, exactly one directory should be specified on the command line. The use of this option is recommended for security as well as compatibility with some boot ROMs which cannot be easily made to include a directory name in its request.

Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allowing anyone to read or write them, unless the --permissive or --umask options are specified.

Gerntoos on serveri konfigutatsoon failis /etc/conf.d/in.tftpd

Seal tuleb muuta parameetreid näiteks

INTFTPD_PATH="/srv/tftproot/"
INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH} -a 192.168.1.10 -c"

Tftp kliendi kasutamine.

Faili saatmine tftp serverisse

tftp -v 192.168.1.1 -c put myfile

Faili tftp serverist faili tõmbamine

$ tftp 192.168.1.2
tftp> get test
Sent 159 bytes in 0.0 seconds
tftp> quit