如何重新启动sshd启动服务

问个问题,我的SSHD服务器进程也启动了,服务也开,ssh也可以登…_linux吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:100,625贴子:
问个问题,我的SSHD服务器进程也启动了,服务也开,ssh也可以登…收藏
ssh也可以登录,但sftp连接不上看log显示:error: subsystem: cannot stat /usr/libexec/openssh/sftp-server: No such file or directoryservice sshd status检查发现openssh-daemon is stopped 重启后停止sshd【失败】
启动sshd【成功】不知道为什么,求解答。openssh-daemon 这个进程不知道为什么running不了
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或Docker中开启sshd服务 | 4LinuxFun
VPS广而告知3516人阅读
1.sudo apt-get install openssh-server
Ubuntu缺省安装了openssh-client,所以在这里就不安装了,如果你的系统没有安装的话,再用apt-get安装上即可。
然后确认sshserver是否启动了:ps -e |grep ssh
如果只有ssh-agent那ssh-server还没有启动,需要/etc/init.d/ssh start,如果看到sshd那说明ssh-server已经启动了。
ssh-server配置文件位于/ etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务:
sudo /etc/init.d/ssh resarssh
连接:ssh&.
1.首先在服务器上安装ssh的服务器端。
$ sudo aptitude install openssh-server
2.&启动ssh-server。$ /etc/init.d/ssh restart
3. 确认ssh-server已经正常工作。$ netstat -tlp
tcp6 0 0 *:ssh *:* LISTEN -
看到上面这一行输出说明ssh-server已经在运行了。
4. 在客户端通过ssh登录服务器。假设服务器的IP地址是192.168.0.103,
登录的用户名是hyx。
$ ssh -l hyx 192.168.0.103
接下来会提示输入密码,然后就能成功登录到服务器上了
Putty 连接Ubuntu
相信很多人都喜欢在虚拟机里面安装linux,以体验它的不同。我想有很多人使用linux,就是想体验它与windows不同的地方。我想linux与 windows最大的不同就是可以使用键盘输入各种命令来取代频繁的鼠标点击。相信一些linuxer也已经体验过了,我相信很多人肯定会非常的兴奋在自己通过敲键盘来实现一些复杂操作的时候。
&& 在这里推荐大家一个可以远程登录linux的软件——putty。它通过ssh加密与主机通信,你不用担心它不安全。并且你可以很方便的与你的虚拟机相连,而不用不停的切换。相信很多有linux管理经验的人经常使用这款软件来登录远程的主机。如果你很感兴趣,那么就赶快去这里下载吧:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
&& 下载下来的putty很简单,不需要安装,直接就能打开。我们可以把它放在c盘windows文件内。以后我们在使用的时候,直接可以再运行中输入putty打开它了。
&&& 这样你就可以登录到linux主机了。但是我们还要设置字体,如果不设置就会出现字符乱码的现象。字体设置如下:
& 这样设置过之后就可以很痛快的使用putty了
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:440549次
积分:6476
积分:6476
排名:第1558名
原创:193篇
转载:124篇
评论:68条
(2)(1)(1)(1)(2)(1)(1)(2)(4)(10)(6)(13)(14)(29)(40)(19)(21)(10)(2)(7)(18)(4)(2)(11)(5)(14)(6)(9)(12)(5)(9)(28)(8)3702人阅读
这里使用sshd服务登录到linux系统的方法,不少同学走了弯路,包括我,我一直使用vmware虚拟linux学习使用的,后来windows病毒的原因转入到linux系统中使用
1,sshd服务安装
2,[root@localhost /]# vi /etc/ssh/sshd_config
Protocol 2
PermitRootLogin yes
去掉这三行的注释
最后一个重要!因为它是允许root用户直接使用sshd服务登录服务器的!
3,重新启动sshd服务
[root@localhost /]# service sshd restart
4,设置sshd为系统自动启动
[root@localhost /]# chkconfig --level 35 sshd on
5,使用客户端连接即可!
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:217961次
积分:3788
积分:3788
排名:第3856名
原创:172篇
转载:61篇
评论:11条
(15)(20)(3)(1)(1)(17)(1)(26)(15)(14)(10)(6)(6)(2)(1)(1)(1)(16)(15)(1)(2)(1)(7)(11)(2)(4)(7)(2)(2)(12)(2)(5)(5)(2)(2)(1)当前访客身份:游客 [
这个人很懒,啥也没写
:后面对于vim的打造很不错,基本可以放弃source ...
:后面对于vim的打造很不错,基本可以放弃source ...
:果然很有用,firefox一直打不开,按照这个方法打...
:引用来自“谦谦君子”的评论如果发现secure CRT ...
:如果发现secure CRT 左键选中时无法复制,等效于c...
:很好 我很需要
:.cn/post/63199/ 参考这里。 ...
:引用来自“fury-hol”的评论 5.1.3表示无此设置,...
:引用来自“fury-hol”的评论5.1.3表示无此设置,...
今日访问:266
昨日访问:299
本周访问:1190
本月访问:4057
所有访问:370889
Cygwin下用Open SSH启动SSH服务
发表于4年前( 13:02)&&
阅读(3821)&|&评论()
0人收藏此文章,
【删除原服务】
如果前面已经建立过服务,但是需要重新启用服务的需要删除服务:
services.msc中可以看cygwin sshd的属性发现服务名为sshd
cmd进入命令行,然后 sc delete sshd,屏幕上出现[SC] DeleteService SUCCESS,
本质上相当于删除HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet下的注册表项
进入services.msc发现服务已删除&
【建立新服务】
然后进入cygwin建立ssh服务:
1) 修改环境变量 PATH变量中加入Cygwin路径 添加CYGWIN变量设为ntsec tty
2) 授权:
使用windows 用户的密码和用户组&
$mkpasswd -l & /etc/passwd&
$mkgroup -l & /etc/group&&&&&&
Note:&& 设置文件权限(如果win7需要先以管理员权限运行cygwin才能使用chmod), 在域用户的时候理论上要加-d,但是经过测试没用,还是用上面的命令,配置好service之后直接连接127.0.0.1然后输入用户名即可,不需要其他密码之类的信息就可以本地ssh登录了
$chmod +r /etc/group $chmod +r /etc/passwd $chmod +rwx /var
$ ssh-host-config&
*** Info: Generating /etc/ssh_host_key
*** Info: Generating /etc/ssh_host_rsa_key
*** Info: Generating /etc/ssh_host_dsa_key
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
ME.privsep.
*** Query: Should privilege separation be used? (yes/no) yes& #输入yes
*** Info: Updating /etc/sshd_config file
*** Warning: The following functions require administrator privileges!
*** Query: Do you want to install sshd as a service?
*** Query: (Say &no& if it is already installed as a service) (yes/no) yes& #输入yes
*** Info: Note that the CYGWIN variable must contain at least &ntsec&
*** Info: for sshd to be able to change user context without password.
*** Query: Enter the value of CYGWIN for the daemon: [ntsec] ntsec& #输入ntsec
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires.& You need to have or to create a privileged
*** Info: account.& This script will help you do so.
*** Info: You appear to be running Windows 2003 Server or later.& On 2003 and
*** Info: later systems, it's not possible to use the LocalSystem account
*** Info: for services that can change the user id without an explicit password
*** Info: (such as passwordless logins [e.g. public key authentication] via sshd).&
*** Info: If you want to enable that functionality, it's required to create a new
*** Info: account with special privileges (unless a similar account already exists).
*** Info: This account is then used to run these special servers.
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no& #输入no,不指定启动用户
*** Query: Create new privileged user account 'cyg_server'? (yes/no) no& #输入no,不指定启动用户
*** ERROR: There was a serious problem creating a privileged user.
*** Query: Do you want to proceed anyway? (yes/no) yes& #输入yes
*** Warning: Expected privileged user 'cyg_server' does not exist.
*** Warning: Defaulting to 'SYSTEM'
*** Info: The sshd service has been installed under the LocalSystem
*** Info: account (also known as SYSTEM). To start the service now, call
*** Info: `net start sshd' or `cygrunsrv -S sshd'.& Otherwise, it
*** Info: will start automatically after the next reboot.
*** Info: Host configuration finished. Have fun!
4) Windows下或者在cygwin窗口中直接 net start sshd& (sshd即为新建的服务,services.msc 中的Cygwin SSHD)
plus) 如果启用服务有问题可以尝试操作:
$ mkpasswd -l & /etc/passwd $ mkgroup -l & /etc/group $ cygrunsrv -R sshd $ ssh-host-config -y $ cygrunsrv -S sshd
另外putty连接ssh服务可以参考:
1)">1)">1" ng-class="{current:{{currentPage==page}}}" ng-repeat="page in pages"><li class='page' ng-if="(endIndex<li class='page next' ng-if="(currentPage
相关文章阅读

我要回帖

更多关于 查看sshd服务是否启动 的文章

 

随机推荐