目录
前言
银河麒麟下配置sshd服务方法。(需要联网)
一、sshd是什么?
Linux中的sshd服务,主要用于pst终端,远程连接到linux服务中。
二、使用步骤
1.检查 ssh 进程是否存在
ps -e|grep ssh
ps :显示进程信息
| :管道符,表示ps 和 grep 命令同时执行
grep :查找
-e : 显示所有进程
2.安装客户端
sudo apt-get install openssh-client=1:8.2p1-4kylin2k1
3.安装服务端
sudo apt-get install openssh-server
4.重启
reboot
重启后一般sshd服务就配置好了。
5. 修改端口
sshd的默认是端口是22 ,可以通过修改 /etc/ssh/sshd_config文件,修改默认端口
改Port 后的数字为需要的端口,然后去掉#号即可
6.设置服务状态命令
查看服务状态: systemctl status sshd
打开服务: systemctl start sshd
关闭服务:systemctl stop sshd
重新开启服务:systemctl restart sshd
设定开机启动:systemctl enable sshd
设定开机不启动:systemctl disable sshd
重新加载配置文件:systemctl reload sshd
列出已开启服务的当前状态:systemctl list-units
总结
实现银河麒麟下安装sshd,实现用sftp传输文件到kylin系统下。