首先在手机上安装一些工具比如ConnectBot,JuiceSSH
本文介绍JuiceSSH(前提是在一个局域网下,不讨论外网连接内网)
打开ssh配置文件改端口为22并重新启动ssh
$ sudo vim /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
$ sudo /etc/init.d/ssh restart
手机上打开JuiceSSH
昵称(随便写)
类型(SSH)
地址(连接对象ip)
认证(新建一个)
端口(22)
确认就可以连接了