Ubuntu 使用MobaXterm远程登陆


Linux

1.安装并开启SSH

sudo apt-get install openssh-server
sudo /etc/init.d/ssh start
2.查看ubuntu地址

ifconfig


Windows

1.安装MobaXterm, 按序号顺序执行

 

使用root用户登录linux显示access denied
分析原因:一般linux系统是默认禁止远程登录root用户

解决办法:需要修改 /etc/ssh/ssh_config 配置,允许登录

1.编辑配置文件

   命令:vi /etc/ssh/sshd_config

2.文件中找到PermitRootLogin

  #PermitRootLogin without-password

  将#去掉,without-password改为yes

  PermitRootLogin yes

3.退出并保存,重启ssh

  命令:service sshd restart

    ubuntu操作openssh-server指令

    1、先停掉SSH服务:sudo stop ssh
    2、卸载openssh-server:apt-get remove openssh-server
    3、卸载openssh-client: apt-get remove openssh-client
    4、安装openssh-server:apt-get install openssh-server
    5、安装openssh-client:apt-get install openssh-client
    6、安装完成以后,启动服务:sudo /etc/init.d/ssh start  

    7、启动后,查看服务是否正确启动: ps -e|grep ssh

ubuntu20 sshd_config文件内容:【请点击链接:https://www.cnblogs.com/axinno1/p/14609658.html

参考资料:https://blog.csdn.net/qq_37124717/article/details/104639369


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM