scp 如何保持原始檔案日期、時間

scp 要怎麼保持檔案的原始時間呢?

man scp 可以看到下述參數:

  • -p :Preserves modification times, access times, and modes from the original file.
  • 範例:scp -p file.txt remote.example.com:

Linode Email 無法寄送的解法

Linode 於 2019/12/5 以後開得新帳號(原因:CAN-SPAM Act),連到外部 SMTP Port 預設都被擋掉,以至於全部 Connection timed out。

新開機器可以直接 telnet 測試看看:

$ telnet gmail-smtp-in.l.google.com 25
Trying 2404:6800:4008:c03::1b…
Trying 74.125.203.26…
telnet: Unable to connect to remote host: Connection timed out

正常狀況

$ telnet gmail-smtp-in.l.google.com 25
Trying 74.125.203.26…
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP k2si12268129pld.364 - gsmtp

於 Postfix 的 /var/log/mail.log 會看到下述訊息:

Apr 29 12:47:24 localhost postfix/smtp[18520]: connect to gmail-smtp-in.l.google.com[74.125.203.27]:25: Connection timed out
Apr 29 12:47:24 localhost postfix/smtp[18521]: connect to gmail-smtp-in.l.google.com[108.177.97.27]:25: Connection timed out
Apr 29 12:47:24 localhost postfix/smtp[18523]: connect to gmail-smtp-in.l.google.com[64.233.189.26]:25: Connection timed out
Apr 29 12:47:54 localhost postfix/smtp[18523]: connect to alt1.gmail-smtp-in.l.google.com[108.177.9.27]:25: Connection timed out
Apr 29 12:48:24 localhost postfix/smtp[18523]: connect to alt2.gmail-smtp-in.l.google.com[209.85.234.26]:25: Connection timed out
Apr 29 12:48:54 localhost postfix/smtp[18522]: connect to alt3.gmail-smtp-in.l.google.com[142.250.11.27]:25: Connection timed out Apr 29 12:49:24 localhost postfix/smtp[18520]: connect to alt4.gmail-smtp-in.l.google.com[142.250.12.27]:25: Connection timed out

想要開通 Email 的 SMTP Port 需要做些設定,然後在於後台開 Ticket 申請。

閱讀全文〈Linode Email 無法寄送的解法〉

透過 LED燈控制器 來控制的殭屍網路

IoT 的設備現在越來越多,而 IoT 的設備重點在於大多都有連接網路,而有連接網路若資安沒有處理好,就會發生此新聞報導的類似問題。

  • 註:這個案例可以提供給 IoT 廠商用,設備的安全性很重要~

閱讀全文〈透過 LED燈控制器 來控制的殭屍網路〉