服务器安装 SSH 服务

安装 SSH

yum install openssh-server

启动 SSH

service sshd start

设置开机运行

chkconfig sshd on

如果你安装的是最小服务器系统默认 已安装 ssh 服务。
带界面化的Linux系统没有安装 ssh。
客户端安装 ssh 工具
Windows 系统下 可以安装 Xshell,Putty,secureCRT
Linux 平台安装客户端软件

yum install openssh-clients

ssh 命令 链接服务器
ssh root@192.168.3.12

SSH config 讲解
Config 存放在 ~/.ssh/config
config 配置语法

SSH config 语法关键字

Host 别名
HostName 主机名
Port 端口
User 用户名
IdentityFile 密匙文件的路径

touch config 创建一个 config 文件

防止 22 端口
通过 vim /etc/ssh/sshd_config
开放 Port 10000 端口自己改就行。
Service sshd restart

Linux 常用命令
软件操作命令
软件包管理器 : yum
安装软件: yum install xxx
卸载软件:yum remove xxx
搜索软件: yum serach xxx
清理缓存:yum clean packages
列出已安装:yum list
软件包信息:yum info xxx

服务器硬件资源和磁盘操作
查看内存 : free -m
硬盘 : df -h
负载 : w/top top 命令通过 q 退出


晴空月明
1 声望0 粉丝