ubuntu安装ssh服务器

首先,判断Ubuntu是否安装了ssh服务: 
1、输入:

#ps -e |grep ssh

如果服务已经启动,则可以同时看到“ssh-agent”和“sshd”,否则表示没有安装服务,或没有开机启动 。

 

2、安装ssh服务,输入命令:

#sudo apt-get install openssh-server

出现问题时,重启ssh服务:

sudo service ssh restart

3、启动服务:

#/etc/init.d/ssh start

4、本机测试是否能够成功登录:

# ssh 用户名@本机ip地址例如:# ssh [email protected],一般都是我设置的是root

最后测试成功如下:

Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-42-generic x86_64) * Documentation: https://help.ubuntu.com/1 package can be updated.0 updates are security updates.Last login: Sun Sep 18 12:35:27 2016 from 192.168.xxx

在Ubuntu 上查看其IP

在windows 使用xshell连接 远程linux 双方必须是有网络的,不然无法连接。

输入:

$ ifconfig

这个出来的是私有的ip,但我们使用的是公有连接

Xshell 远程连接阿里云Linux 服务器

如下图:

Xshell 远程连接阿里云Linux 服务器

 配置完成后来到Xshell软件

填写ip

Xshell 远程连接阿里云Linux 服务器

 填写用户名密码

Xshell 远程连接阿里云Linux 服务器

服务器密码忘记,来这修改

Xshell 远程连接阿里云Linux 服务器 对是的填写这个密码才好用

相关文章:

  • 2021-08-04
  • 2021-11-02
  • 2022-01-17
  • 2021-11-21
  • 2021-04-19
  • 2021-06-11
  • 2021-12-21
  • 2021-09-04
猜你喜欢
  • 2022-01-16
  • 2021-11-27
  • 2021-12-07
  • 2021-10-23
  • 2021-10-23
  • 2021-06-18
相关资源
相似解决方案