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
====本文内容已完,宣传我的项目====
欢迎关注《休闲益智游戏》微信服务号
谢谢