TFTPサーバのatftpdをインストールする手順を記載します。
Table of Contents
1 atftpdをインストールする
atftpdパッケージをインストールします。inetdを使用せずにsystemdでサービスを起動します。デフォルトで/srv/tftpがTFTPサーバのディレクトリとして使われます。
$ sudo apt install -y atftpd
$ sudo sed -e 's/^USE_INETD=true/USE_INETD=false/g' \
-i /etc/default/atftpd
$ sudo systemctl enable atftpd
$ sudo systemctl restart atftpd
2 atftpでファイルをGETする
atftpパッケージをインストールします。
$ sudo apt install -y atftp
TFTPサーバにファイルを置きます。
$ echo "hello" | sudo tee /srv/tftp/hello.txt
TFTPクライアントのatftpでTFTPサーバからファイルをGETします。
$ echo "get hello.txt" | atftp 127.0.0.1 tftp> get hello.txt tftp> $ cat hello.txt hello