HowTo: Restart SSH Service under Linux / UNIX

How do I restart SSH service under Linux or UNIX operating systems?

The command to restart ssh are as follows (you must login as root user):

CentOS / RHEL / Fedora / Redhat Linux Restart SSH

# /etc/init.d/sshd restart
OR
# service sshd restart

Debian / Ubuntu Linux Restart SSH

# /etc/init.d/ssh restart
OR
# service ssh restart

FreeBSD Restart SSH

# /etc/rc.d/sshd restart

UNIX Restart SSH

# kill -HUP `cat /var/run/sshd.pid`
Please note that the location of /var/run/sshd.pid may change. So just search a bit through /var/run/ directory.

时间: 2024-08-28 03:44:05

HowTo: Restart SSH Service under Linux / UNIX的相关文章

Linux Redirecting to /bin/systemctl restart iptables.service

方案 一 1.昨天碰到一个错误,linux下输入命令:service iptables restart时,总会报下面一个提示很简单,这句话的意思就是让你重定向到systemctl然后再启用,白话就是说用systemctl方式启动 解决方法:输入 systemctl start iptables这个时候表示防火墙已经启动了,你在通过公网访问公网IP:8080就会出现一个小猫头像了 方案二 执行如下命令 systemctl stop firewalld systemctl mask firewall

Linux/Unix shell 监控Oracle监听器(monitor listener)

使用shell脚本实现对Oracle数据库的监控与管理将大大简化DBA的工作负担,如常见的对实例的监控,监听的监控,告警日志的监控,以及数据库的备份,AWR report的自动邮件等.本文给出Linux 下使用 shell 脚本来监控 Oracle 监听器. Linux Shell的相关参考:        Linux/Unix shell 脚本中调用SQL,RMAN脚本        Linux/Unix shell sql 之间传递变量        Linux/Unix shell 调用

在 Linux/Unix/Mac 下清除 DNS 查询缓存

在MS-Windows下,你可以使用ipconfig命令来清除dns缓存.然而,Linux和Unix提供了不同的方法来清除缓存.Linux可以运行 nscd 或者 BIND 或者 dnsmasq 作为名称服务缓存守护进程.大型或者工作组服务器可能使用BIND或者dnsmasq作为专用缓存服务器来加速查询. 如何: 清除 nscd dns 缓存 Nscd 会缓存libc发起的名称服务的请求.如果把检索NSS数据看做很慢,那么nscd能够显著加快连续访问同一数据的速度,并能提高整个系统的性能.只需重

How to run OFBiz as a Service on linux

Windows See this specific guide: How to Run OFBiz as Windows Service with Java Service Wrapper Linux Assuming your Linux distro uses some variant of the System V Init framework to run its services, you can use the rc.ofbiz script inside the root OFBi

Linux/Unix mac 命令笔记

bg和fg Linux/Unix 区别于微软平台最大的优点就是真正的多用户,多任务.因此在任务管理上也有别具特色的管理思想.我们知道,在 Windows 上面,我们要么让一个程序作为服务在后台一直运行,要么停止这个服务.而不能让程序在前台后台之间切换.而 Linux 提供了 fg 和 bg 命令,让你轻松调度正在运行的任务. 假设你发现前台运行的一个程序需要很长的时间,但是需要干其他的事情,你就可以用 Ctrl-Z ,挂起这个程序,然后可以看到系统提示:[1]+ Stopped /root/bi

如何在 Linux/Unix/Mac 下清除 DNS 查询缓存

我在Linux下使用拨号连接上网,频繁的拨号断线造成DNS的问题.我如何在Linux/Unix发行版下使用shell命令清除DNS缓存? 在MS-Windows下,你可以使用ipconfig命令来清除dns缓存.然而,Linux和Unix提供了不同的方法来清除缓存.Linux可以运行 nscd 或者 BIND 或者 dnsmasq 作为名称服务缓存守护进程.大型或者工作组服务器可能使用BIND或者dnsmasq作为专用缓存服务器来加速查询. 如何: 清除 nscd dns 缓存 Nscd 会缓存

阿里云报错Redirecting to /bin/systemctl restart sshd.service

转:http://blog.csdn.net/caijunfen/article/details/70599138 云服务器 ECS Linux CentOS 7 下重启服务不再通过 service  操作,而是通过 systemctl 操作. 查看:systemctl status sshd.service 启动:systemctl start sshd.service 重启:systemctl restart sshd.service 自启:systemctl enable sshd.ser

工作中用到的 Linux/Unix 常用命令

LINUX平时工作中用到的常用命令 :       scp是有Security的文件copy,基于ssh登录.操作起来比较方便,比如要把当前一个文件copy到远程另外一台主机上,可以如下命令. scp /home/1.gif [email protected]:/home/root 然后会提示你输入另外那台172.19.2.75主机的root用户的登录密码,接着就开始cp和ungzip了 如果想反过来操作,把文件从远程主机copy到当前系统,也很简单: scp [email protected]

linux/unix lsof用法

使用 lsof 查找打开的文件 通过查看打开的文件,了解更多关于系统的信息.了解应用程序打开了哪些文件或者哪个应用程序打开了特定的文件,作为系统管理员,这将使得您能够作出更好的决策.例如,您不应该卸载具有打开文件的文件系统.使用 lsof,您可以检查打开的文件,并根据需要在卸载之前中止相应的进程.同样地,如果您发现了一个未知的文件,那么可以找出到底是哪个应用程序打开了这个文件. 在 UNIX® 环境中,文件无处不在,这便产生了一句格言:“任何事物都是文件”.通过文件不仅仅可以访问常规数据,通常还