Secure Shell (SSH)
目录

SSH-2 protocol architecture(RFC 4251):

  1. Transport Layer(RFC 4253)
  2. User Authentication Layer(RFC 4252)
  3. Connection Layer(RFC 4254)

1. Transport Layer

1.1 提高scp文件传输速度

scp是OpenSSH的组件,作用是使用ssh安全传输文件,因此传输过程中会对文件加密解密,这样传输速度就会受CPU加密解密能力的限制。

比如在默认情况下在本地集群使用scp传输文件,速度只能达到50+MB/s,这时发送端和接收端的进程CPU都达到了100%。

scp可以使用AES, Blowfish, Acrfour, 3DES加密方式。 这时使用-c参数更改加密算法,改成scp -c arcfour [src] [dst],速度能达到100MB/s左右,快达到千兆网卡的极限了。

2. Connection Layer

SSH connection layer provides:

  • interactive login sessions
  • remote execution of commands
  • forwarded TCP/IP connections
  • forwarded X11 connections

All these are channels. Multiple channels are multiplexed into a single connection/tunnel. Channels are identified by numbers at each end.

3. Libs

发表评论