2009年1月23日 星期五

Linux 指令 ssh 及 scp 說明

SSH指令連入 192.168.1.100 使用帳號 achilles#ssh achilles@192.168.1.100如果要指定 ssh port 為 435# ssh -p 435 peter@smallfry使用 ssh 執行遠端主機程式後回傳# ssh 192.168.1.100 "uname -a"root@192.168.1.100's password:Linux bigboy 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT 2004 i686 i686 i386 GNU/Linux SCP指令 使用 scp 下載檔案:下載遠端的 /tmp/software.rpm 到本機 /usr/rpm 中# scp root@smallfry:/tmp/software.rpm /usr/rpmroot@smallfry's password:software.rpm 100% 1011 27.6KB/s 00:00使用 scp 上傳檔案:把本機的 /etc/hosts 上傳到遠端 /tmp 目錄# scp /etc/hosts root@192.168.1.103:/tmproot@192.168.1.103's password:hosts 100% 1011 27.6KB/s 00:00
參考來源:http://www.linuxhomenetworking.c ... ns_and_File_Copying

沒有留言: