IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    ubuntu下安装ssh

    键盘上的舞者发表于 2015-08-09 03:53:47
    love 0

    安装ssh-server
    sudo apt-get install openssh-server
    安装ssh-client
    sudo apt-get install openssh-client

    确认ssh是否安装好:
    ps -e | grep sshd

    SSH默认服务端口为22,用户可以自已定义成其他端口,如222,需要修改的配置文件为:
    /etc/ssh/sshd_config
    把里面的Port参数修改成222即可
    然后重启SSH服务:
    sudo/etc/init.d/ssh restart

    使用root用户直接登录:

    1. 修改 root 密码

    sudo passwd root

    2. 以其他账户登录,通过 sudo nano 修改 /etc/ssh/sshd_config :

    xxx@ubuntu14:~$ su - root
    Password:
    root@ubuntu14:~# vi /etc/ssh/sshd_config

    3. 注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes

    # Authentication:
    LoginGraceTime 120
    #PermitRootLogin without-password
    PermitRootLogin yes
    StrictModes yes

    4. 重启 ssh  服务

    root@ubuntu14:~# sudo service ssh restart
    ssh stop/waiting
    ssh start/running, process 1499
    root@ubuntu14:~#

    推荐ssh客户端:bitvise ssh client



沪ICP备19023445号-2号
友情链接