我正在嘗試使用我的.pem
文件通過 ssh 連接到亞馬遜實例,但CHMOD 400
無法正常工作,因為它顯示“此命令不可用”。它可以在我的 Mac 終端機上運行,但不能在我的 Linux Ubuntu 18.04 上運行。
答案1
Ubuntu 中的指令名稱是區分大小寫,所以CHMOD
不等於chmod
:
$ ls -l file
-rw-rw-r-- 1 dessert dessert 0 Jun 1 13:25 file
$ CHMOD 400 file
CHMOD: command not found
$ chmod 400 file
$ ls -l file
-r-------- 1 dessert dessert 0 Jun 1 13:25 file
試試小寫chmod
吧!