Skip to the content.

SSH 和 SCP 命令简介

2016-10-26 15:42:55


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]

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 选项我曾在连接我的 Amazon Aws EC2 服务器的时候使用过,用于指定私有密钥文件,命令大致如下:

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