SSH 和 SCP 命令簡介

SSH

ssh -- OpenSSH SSH client (remote login program)
ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L address] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
  • -b Use bind_address on the local machine as the source address of the connection. Only useful on systems with more than one address.
  • -i Selects a file from which the identity (private key) for public key authentication is read.
  • -l Specifies the user to log in as on the remote machine.
  • -p Port to connect to on the remote host.

SCP

scp -- secure copy (remote file copy program)
scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
  • -i Selects the file from which the identity (private key) for public key authentication is read.
  • -l Limits the used bandwidth, specified in Kbit/s.
  • -P Specifies the port to connect to on the remote host.
  • -r Recursively copy entire directories.

-i 選項我曾在連接我的 Amazon Aws EC2 服務器的時候使用過,用於指定私有密鑰文件,命令大致如下:

ssh -i "SecretKEY.pem" ubuntu@ec2-xx-xx-xx-xx.ap-southeast-1.compute.amazonaws.com

====本文內容已完,宣傳我的項目====
歡迎關注《休閒益智遊戲》微信服務號
謝謝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章