Uninote
Uninote

ubuntu开启SSH服务远程登录

查看是否安装了ssh-server服务。默认只安装ssh-client服务。

dpkg -l | grep ssh

安装ssh-server服务

sudo apt-get install openssh-server

确认ssh-server是否启动

ps -e | grep ssh
看到sshd那说明ssh-server已经启动
没有则启动:sudo /etc/init.d/ssh start或sudo service ssh start

配置相关

#ssh-server配置文件位于/etc/ssh/sshd_config,可以定义SSH的服务端口,默认端口是22,可自定义。
sudo vim /etc/ssh/sshd_config

#把配置文件中”PermitRootLogin without-password”加个”#”号,增加”PermitRootLogin yes”

#然后重启SSH服务
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start(sudo service ssh restart)
参数类别 是否允许ssh登陆 登录方式 交互shell
yes 允许 没有限制 没有限制
without-password 允许 除密码以外 没有限制
forced-commands-only 允许 仅允许使用密钥 仅允许已授权的命令
no 不允许 N/A N/A

登录

ssh username@ip
#ip:服务器ip
#username:服务用户,然后需要输入密码。

ubuntu安装redis

vim常用快捷键

点赞(1) 阅读(279) 举报
目录
标题