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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值