sudo  spt-get install openssh-server

  ubuntu默认安装了openssh-client,这里就不安装了。如果你的电脑上没有安装,用apt-get装上即可。

     rpm -qa|grep ssh 查看是否安装了ssh服务以及版本号相关信息 。
     比较:
     如果你是redhat或者fedora系统,如果能上网的话,用yum install openssh -y 来安装。然后用命令 chkconfig --level 345 sshd on 使得系统开机运行ssh服务,用/etc/rc.d/init.d/sshd start开通服务,你切换到root用户才行,或者用sudo。
     如果你是ubuntu或者debian 系统的话,用sudo apt-get install openssh-server安装,用/etc/init.d/sshd start开通服务。
      用netstat -an| grep 22 查看是否有ssh。