ubuntu18.04ssh无法远程登录问题(代码片段)

liweiwei1419 liweiwei1419     2023-01-27     643

关键词:

Ubuntu 18.04 SSH 无法远程登录问题

Ubuntu 系统默认 root 用户是不能登录的,密码也是空的。

root 用户设置密码:

sudo passwd root

解决 Ubuntu 18.04 SSH 无法远程登录问题

1、安装 openssh-server

sudo apt-get install openssh-server

2、编辑配置文件 /etc/ssh/sshd_config

sudo vi /etc/ssh/sshd_config
  • 禁用:PermitRootLogin prohibit-password
  • 添加:PermitRootLogin yes


或者:

sudo nano /etc/ssh/sshd_config
PermitRootLogin prohibit-password to PermitRootLogin yes 
PasswordAuthentication no to PasswordAuthentication yes

3、重启服务

sudo service ssh restart

或者:

sudo systemctl restart ssh

然后登录:

ssh root@192.168.64.5 # Multipass 虚拟机
ssh root@192.168.47.128 # VMWare 虚拟机

然后输入密码。

参考资料

  • https://blog.csdn.net/xiato_yu/article/details/104166581
  • https://www.digitalocean.com/community/questions/error-permission-denied-publickey-when-i-try-to-ssh
    https://cloud.tencent.com/developer/article/1496006
  • scp 跨机器拷贝:https://segmentfault.com/a/1190000014667067

ubuntu18.04ssh无法远程登录问题(代码片段)

Ubuntu18.04SSH无法远程登录问题Ubuntu系统默认root用户是不能登录的,密码也是空的。给root用户设置密码:sudopasswdroot解决Ubuntu18.04SSH无法远程登录问题1、安装openssh-serversudoapt-getinstallopenssh-server2、编辑配置文件/etc/ssh/sshd_conf... 查看详情

在ubuntu18.04系统中启用ssh登录的方法

...是Linux系统管理中的经常要用到的一种远程访问技术。在Ubuntu18.04系统仓库中,已经收录了同为开源的OpenSSH,我们可以用它来为系统开启SSH访问功能。一、打开终端,输入以下命令安装OpenSSH服务:sudoapt-getinstallopenssh-server二、步... 查看详情

win10远程登录ubuntu18.04错误

...sshd_config文件把默认passwordauthentication设置为yes(因为win10:ubuntu默认no)以下为配置步骤,请参考:刚解决此问题,纠结了一段时间,现给你解答:#cd/etc/ssh/#vimsshd_config修改如下:#PasswordAuthenticationno改为:PasswordAuthenticationyes(注... 查看详情

ubuntu无法用root远程登录(xshell无法用root登录ubuntu,vs无法用root远程调试ubuntu)(代码片段)

如果没有openssh-server需要安装openssh-serveraptinstallopenssh-server然后修改配置文件gedit/etc/ssh/sshd_config将PermitRootLoginprohibit-password改成PermitRootLoginyes然后重启ssh服务servicesshdrestart然后就可以用root登录了xshell可以连VS也可以 查看详情

ubuntu无法用root远程登录(xshell无法用root登录ubuntu,vs无法用root远程调试ubuntu)(代码片段)

如果没有openssh-server需要安装openssh-serveraptinstallopenssh-server然后修改配置文件gedit/etc/ssh/sshd_config将PermitRootLoginprohibit-password改成PermitRootLoginyes然后重启ssh服务servicesshdrestart然后就可以用root登录了xshell可以连VS也可以 查看详情

ubuntu无法用root远程登录(xshell无法用root登录ubuntu,vs无法用root远程调试ubuntu)(代码片段)

如果没有openssh-server需要安装openssh-serveraptinstallopenssh-server然后修改配置文件gedit/etc/ssh/sshd_config将PermitRootLoginprohibit-password改成PermitRootLoginyes然后重启ssh服务servicesshdrestart然后就可以用root登录了xshell可以连VS也可以 查看详情

尝试在 Xampp (ubuntu 18.04) 上安装备份时无法登录到 wordpress 管理区域

】尝试在Xampp(ubuntu18.04)上安装备份时无法登录到wordpress管理区域【英文标题】:Unabeltologintowordpress\'sadminareawhentriedtoinstallthebackuponXampp(ubuntu18.04)【发布时间】:2020-02-1606:33:06【问题描述】:我最近在使用WordPress构建的网站时遇到... 查看详情

ubuntu开启ssh服务远程登录(代码片段)

Ubuntu开启SSH服务远程登录Ubuntu下开启ssh服务并能通过MobaXterm或者Xshell进行远程登录本人使用的是window10系统安装的MobaXtermwindow10系统安装MobaXterm可以参考https://blog.csdn.net/weixin_45523107/article/details/119150865Ubuntu下开启ssh服务具体操作... 查看详情

腾讯云ubuntu使用ssh密钥远程root用户登陆(代码片段)

本文解决方案来源于:Ubuntu18.04root使用ssh密钥远程登陆起因Ubuntu默认禁止root用户远程登陆。腾讯云官方所给的解决方案:Ubuntu系统如何使用root用户登录实例?但是我们需要的是通过密钥登陆root用户,而非密码。... 查看详情

解决linuxubuntu下ssh无法连接的问题(代码片段)

...、远程登录7、问题7.1使用xshell登陆时密码框为灰色,无法输入密码7.2无法使用root远程登录7.3禁止空密码用户登录8、SSH介绍9、xshell软件下载地址SSH服务分为客户端和服务器。如果想用winscp/putty/xshell远程登录LinuxUbuntu服务 查看详情

ssh无法远程登陆问题汇总(代码片段)

...5.1检查防火墙是否启动5.2修改防火墙配置注:这里以ubuntu系统为例。1.ssh服务是否已经启动1.1sshd服务是否已经安装ubuntu20.04LTS默认安装openssh-server& 查看详情

解决linuxubuntu下ssh无法连接的问题(代码片段)

...为客户端和服务器。如果想用winscp/putty/xshell远程登录LinuxUbuntu服务器,就需要安装SSHserver。1、检查是否开启SSH服务因为Ubuntu默认是不安装SSH服务的,所以在安装之前可以查看目前系统是否安装,通过以下命令:ps-... 查看详情

腾讯云ubuntu使用ssh密钥远程root用户登陆(代码片段)

本文解决方案来源于:Ubuntu18.04root使用ssh密钥远程登陆起因Ubuntu默认禁止root用户远程登陆。腾讯云官方所给的解决方案:Ubuntu系统如何使用root用户登录实例?但是我们需要的是通过密钥登陆root用户,而非密码。... 查看详情

ssh无法远程连接ubuntu系统,提示"systemisbootingup.seepam_nologin"

问题:使用ssh(xshell或者putty)远程连接Linux(ubuntu)系统时,提示:"Systemisbootingup.Seepam_nologin(8)"Connectionclosing...Socketclose.无法远程登录!但是本地可以正常登录。解决 查看详情

如何解决linux下通过root无法远程登录

参考技术A发现问题通过xshell连接ubuntu,输入,连接名称,ip,端口,已经用户名密码,输入完成后点击连接,开始进行远程连接,发现一直提示连接不了;提示"ssh服务器拒绝了密码,请再试一次。"其实试了多少次都没用... 查看详情

ubuntu18.04连接ssh(代码片段)

...装安装openssh-server安装ssh客户端修改配置文件重启ssh服务Ubuntu18.04,出于安全预防措施,ssh禁止root登陆安装安装openssh-serversudoaptinstallopenssh-server安装ssh客户端sudoaptinstallssh修改配置文件修改/etc/ssh下的sshd_config将其中#PermitR 查看详情

SSH 权限被拒绝(公钥、密码) - 容器 docker ubuntu 18.04

】SSH权限被拒绝(公钥、密码)-容器dockerubuntu18.04【英文标题】:SSHPermissiondenied(publickey,password)-containerdockerubuntu18.04【发布时间】:2021-08-1014:31:42【问题描述】:我在我的Windows10上安装了Docker,我正在使用我的WSL1来创建dockerfile... 查看详情

ubuntu 18.04 登录循环

】ubuntu18.04登录循环【英文标题】:ubuntu18.04loginloop【发布时间】:2020-08-1816:23:59【问题描述】:我使用的是ubuntu18.04。我对/etc/default/grub文件进行了更改并导致登录循环。tty命令仍然可以使用。我撤消了未更改的内容,但登录循... 查看详情