Ubuntu ssh 服务

1)安装ssh-server
sudo apt-get install openssh-server
2)安装ssh-client
sudo apt-get install openssh-client

3)开启root远程登录权限

  打开sshd_config文件,注释PermitRootLogin without-password,添加PermitRootLogin yes

  vim /etc/ssh/sshd_config

  #PermitRootLogin without-password

  PermitRootLogin yes

4)修改ssh端口:
  SSH默认服务端口为22,用户可以自已定义成其他端口,如222,需要修改的配置文件为:
  修改上述文件中Port值

5)重启ssh服务

sudo service ssh restart

或者:

/etc/init.d/ssh restart

posted @ 2016-07-18 22:41  葫芦娃Vs奥特曼  阅读(175)  评论(0编辑  收藏  举报