Can't start, stop, or interface with SSH serviceStart / stop init.d script without root accessBizarre SSH Problem - It won't even startSSH Does not start on bootShutdown slow: unknown job s35networkingHow to create a init.d script for openssh-server which was compiled and installed from source using configure + make + make install?SSH refusing connection after changing default portinitclt not seeing init script in Ubuntu 12 64bitsuddenly can't SSH (connection refused), sshd service not recognizedvsftpd service will not start for 14.04Can't ssh into my home PC remotely
Strange math syntax in old basic listing
What does the behaviour of water on the skin of an aircraft in flight tell us?
Can a rogue effectively triple their speed by combining Dash and Ready?
Could I be denied entry into Ireland due to medical and police situations during a previous UK visit?
How did early x86 BIOS programmers manage to program full blown TUIs given very few bytes of ROM/EPROM?
How can I grammatically understand "Wir über uns"?
Hiker's Cabin Mystery | Pt. IX
If I create magical darkness with the Silent Image spell, can I see through it if I have the Devil's Sight warlock invocation?
What's the most polite way to tell a manager "shut up and let me work"?
Can a wire having a 610-670 THz (frequency of blue light) AC frequency supply, generate blue light?
Differences between “pas vrai ?”, “c’est ça ?”, “hein ?”, and “n’est-ce pas ?”
Is this light switch installation safe and legal?
How to detach yourself from a character you're going to kill?
Where can I find the list of all tendons in the human body?
Uncommanded roll at high speed
How to capture more stars?
The deliberate use of misleading terminology
Is it possible to change original filename of an exe?
How can I offer a test ride while selling a bike?
chmod would set file permission to 000 no matter what permission i try to set
When a current flow in an inductor is interrupted, what limits the voltage rise?
What caused the tendency for conservatives to not support climate change regulations?
Self-Preservation: How to DM NPCs that Love Living?
What is the intuition behind uniform continuity?
Can't start, stop, or interface with SSH service
Start / stop init.d script without root accessBizarre SSH Problem - It won't even startSSH Does not start on bootShutdown slow: unknown job s35networkingHow to create a init.d script for openssh-server which was compiled and installed from source using configure + make + make install?SSH refusing connection after changing default portinitclt not seeing init script in Ubuntu 12 64bitsuddenly can't SSH (connection refused), sshd service not recognizedvsftpd service will not start for 14.04Can't ssh into my home PC remotely
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Having really bizarre behavior with ssh
. I have the ssh-server running fine, configured ufw
(firewall) fine as well. However, it seems I can't manage ssh
as a service or through /etc/init.d/ssh
.
I re-installed openssh-server
specifically to ensure my minor configuration tweaks to /etc/ssh/sshd_config
were not the problem.
Ubuntu:~/$ sudo /etc/init.d/ssh status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status ssh
ssh stop/waiting
and
Ubuntu:~/$ sudo service ssh status
ssh stop/waiting
but I can ssh fine (either from Ubuntu [localhost] or otherComputer [remotely], presume the comp's name is Ubuntu)
otherComputer:~/$ ssh me@Ubuntu
me@Ubuntu's password:
me@Ubuntu:~/$
Very frustrating, unsure what the problem is. I'm running gnome-keyring
to manage my ssh-agent
and keys, but this shouldn't interfere with ssh-server
as a service.
ssh services init.d gnome-keyring
|
show 3 more comments
Having really bizarre behavior with ssh
. I have the ssh-server running fine, configured ufw
(firewall) fine as well. However, it seems I can't manage ssh
as a service or through /etc/init.d/ssh
.
I re-installed openssh-server
specifically to ensure my minor configuration tweaks to /etc/ssh/sshd_config
were not the problem.
Ubuntu:~/$ sudo /etc/init.d/ssh status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status ssh
ssh stop/waiting
and
Ubuntu:~/$ sudo service ssh status
ssh stop/waiting
but I can ssh fine (either from Ubuntu [localhost] or otherComputer [remotely], presume the comp's name is Ubuntu)
otherComputer:~/$ ssh me@Ubuntu
me@Ubuntu's password:
me@Ubuntu:~/$
Very frustrating, unsure what the problem is. I'm running gnome-keyring
to manage my ssh-agent
and keys, but this shouldn't interfere with ssh-server
as a service.
ssh services init.d gnome-keyring
First, Ubuntu uses upstart. Second, what is the problem ?
– Panther
Feb 6 '13 at 21:27
The problem is that he can't stop the ssh service.
– jdthood
Feb 6 '13 at 21:56
1
@jdthood No. I think he just doesn't understand the difference between an ssh server and the ssh client.
– Alex L.
Feb 6 '13 at 22:02
@Alex: Ah, yes, that's possible. I was assuming that the machine named 'Ubuntu' was the one runningsshd
.
– jdthood
Feb 6 '13 at 22:07
1
Alex got it right. In short, ssh service(sshd
) and thessh
client command are different things. (ssh
is not a service)
– lamino
Apr 8 '17 at 21:12
|
show 3 more comments
Having really bizarre behavior with ssh
. I have the ssh-server running fine, configured ufw
(firewall) fine as well. However, it seems I can't manage ssh
as a service or through /etc/init.d/ssh
.
I re-installed openssh-server
specifically to ensure my minor configuration tweaks to /etc/ssh/sshd_config
were not the problem.
Ubuntu:~/$ sudo /etc/init.d/ssh status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status ssh
ssh stop/waiting
and
Ubuntu:~/$ sudo service ssh status
ssh stop/waiting
but I can ssh fine (either from Ubuntu [localhost] or otherComputer [remotely], presume the comp's name is Ubuntu)
otherComputer:~/$ ssh me@Ubuntu
me@Ubuntu's password:
me@Ubuntu:~/$
Very frustrating, unsure what the problem is. I'm running gnome-keyring
to manage my ssh-agent
and keys, but this shouldn't interfere with ssh-server
as a service.
ssh services init.d gnome-keyring
Having really bizarre behavior with ssh
. I have the ssh-server running fine, configured ufw
(firewall) fine as well. However, it seems I can't manage ssh
as a service or through /etc/init.d/ssh
.
I re-installed openssh-server
specifically to ensure my minor configuration tweaks to /etc/ssh/sshd_config
were not the problem.
Ubuntu:~/$ sudo /etc/init.d/ssh status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status ssh
ssh stop/waiting
and
Ubuntu:~/$ sudo service ssh status
ssh stop/waiting
but I can ssh fine (either from Ubuntu [localhost] or otherComputer [remotely], presume the comp's name is Ubuntu)
otherComputer:~/$ ssh me@Ubuntu
me@Ubuntu's password:
me@Ubuntu:~/$
Very frustrating, unsure what the problem is. I'm running gnome-keyring
to manage my ssh-agent
and keys, but this shouldn't interfere with ssh-server
as a service.
ssh services init.d gnome-keyring
ssh services init.d gnome-keyring
edited Feb 6 '13 at 23:56
Matt Senate
asked Feb 6 '13 at 21:22
Matt SenateMatt Senate
16113
16113
First, Ubuntu uses upstart. Second, what is the problem ?
– Panther
Feb 6 '13 at 21:27
The problem is that he can't stop the ssh service.
– jdthood
Feb 6 '13 at 21:56
1
@jdthood No. I think he just doesn't understand the difference between an ssh server and the ssh client.
– Alex L.
Feb 6 '13 at 22:02
@Alex: Ah, yes, that's possible. I was assuming that the machine named 'Ubuntu' was the one runningsshd
.
– jdthood
Feb 6 '13 at 22:07
1
Alex got it right. In short, ssh service(sshd
) and thessh
client command are different things. (ssh
is not a service)
– lamino
Apr 8 '17 at 21:12
|
show 3 more comments
First, Ubuntu uses upstart. Second, what is the problem ?
– Panther
Feb 6 '13 at 21:27
The problem is that he can't stop the ssh service.
– jdthood
Feb 6 '13 at 21:56
1
@jdthood No. I think he just doesn't understand the difference between an ssh server and the ssh client.
– Alex L.
Feb 6 '13 at 22:02
@Alex: Ah, yes, that's possible. I was assuming that the machine named 'Ubuntu' was the one runningsshd
.
– jdthood
Feb 6 '13 at 22:07
1
Alex got it right. In short, ssh service(sshd
) and thessh
client command are different things. (ssh
is not a service)
– lamino
Apr 8 '17 at 21:12
First, Ubuntu uses upstart. Second, what is the problem ?
– Panther
Feb 6 '13 at 21:27
First, Ubuntu uses upstart. Second, what is the problem ?
– Panther
Feb 6 '13 at 21:27
The problem is that he can't stop the ssh service.
– jdthood
Feb 6 '13 at 21:56
The problem is that he can't stop the ssh service.
– jdthood
Feb 6 '13 at 21:56
1
1
@jdthood No. I think he just doesn't understand the difference between an ssh server and the ssh client.
– Alex L.
Feb 6 '13 at 22:02
@jdthood No. I think he just doesn't understand the difference between an ssh server and the ssh client.
– Alex L.
Feb 6 '13 at 22:02
@Alex: Ah, yes, that's possible. I was assuming that the machine named 'Ubuntu' was the one running
sshd
.– jdthood
Feb 6 '13 at 22:07
@Alex: Ah, yes, that's possible. I was assuming that the machine named 'Ubuntu' was the one running
sshd
.– jdthood
Feb 6 '13 at 22:07
1
1
Alex got it right. In short, ssh service(
sshd
) and the ssh
client command are different things. (ssh
is not a service)– lamino
Apr 8 '17 at 21:12
Alex got it right. In short, ssh service(
sshd
) and the ssh
client command are different things. (ssh
is not a service)– lamino
Apr 8 '17 at 21:12
|
show 3 more comments
3 Answers
3
active
oldest
votes
What follows assumes that the computer on which you re-installed openssh-server
and from which you are ssh
ing is NOT "Ubuntu", the machine you accessing by means of ssh me@Ubuntu
.
I think that your problem is confusion about the difference between the ssh daemon and the ssh client. The ssh daemon (sshd
) is the program that allows you or others to ssh
into the machine that the daemon is running on. When you run sudo service ssh <whatever>
you are giving commands to sshd
, i.e. to start or stop or whatever.
The other piece of ssh is the ssh client. This is what you start whenever you run ssh somebody@host.name
in a terminal. This is a self-contained program that connects with the ssh daemon running on computer called "host.name
". For ssh
to work there must be an ssh daemon running on the computer it wants to connect to but there does not need to be one running on its own computer.
What this all means is that your computer is working perfectly fine. You are able to ssh
out to a remote server as long as you have networking.
In fact you should probably remove the openssh-server
package from your computer as if it is not being used all it would do is be a security risk.
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
add a comment |
@alex-l answer to me is right:
(as root)
service ssh status
service ssh stop
then check if the port is up (22)
netstat -nat
that's all
other thing that you can do to check if ereytinh is ok is do from other machine an
ssh -v user@ubuntu-machine
1
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service sincesudo service ssh status
orsudo service ssh stop
do nothing.
– Matt Senate
Feb 6 '13 at 23:59
ok, then do atailf /var/log/syslog
in a terminal (as root) and do sudoservice ssh stop
in another terminal and tell us whai it say in the first terminal.
– maniat1k
Feb 7 '13 at 11:11
Log said nothing as I did this:$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
add a comment |
It's worth knowing that as far as I know, the 'service ssh [stop|status]' command, applies to the process identified in /var/run/sshd.pid but the actual process listening can be identified by running 'sudo netstat -lpn |grep ssh' if they don't match, that'll be why the confusion is there.
On my machine this is what I see:-
root@babypuss:/var/www/middletier# ls /var/run/sshd.pid
/var/run/sshd.pid
root@babypuss:/var/www/middletier# cat /var/run/sshd.pid
10959
root@babypuss:/var/www/middletier# ps ax |grep sshd
10959 ? Ss 0:00 /usr/sbin/sshd -D
If the pid's don't match, then (as root) kill the running sshd process and start it again with 'service ssh start' to see what happens.
But as has been said before, if on the Ubuntu machine, you can run 'ps ax |grep sshd' and see nothing running, then check isn't not some kind of xinet type service by asserting via 'netstat -lpn |grep 22' that nothing is listening on port 22. If nothing is really listening, then the most likely problem is that the machine you're connecting to, from somewhere else, isn't the one you're looking at (so check the /etc/hosts file on @otherComputer).
If you're 90% sure it is connecting to the machine you think you are, then double check with 'netstat -n |grep -v ^unix' on each machine, to identify the actual connection, and the shell running on @Ubuntu when it's connected.
If you really can't see the listening service, be afraid. It could be a rootkit. Try shutting down the computer and attempting to reconnect, to be absolutely sure you're connecting to the machine you're worrying about.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f252153%2fcant-start-stop-or-interface-with-ssh-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
What follows assumes that the computer on which you re-installed openssh-server
and from which you are ssh
ing is NOT "Ubuntu", the machine you accessing by means of ssh me@Ubuntu
.
I think that your problem is confusion about the difference between the ssh daemon and the ssh client. The ssh daemon (sshd
) is the program that allows you or others to ssh
into the machine that the daemon is running on. When you run sudo service ssh <whatever>
you are giving commands to sshd
, i.e. to start or stop or whatever.
The other piece of ssh is the ssh client. This is what you start whenever you run ssh somebody@host.name
in a terminal. This is a self-contained program that connects with the ssh daemon running on computer called "host.name
". For ssh
to work there must be an ssh daemon running on the computer it wants to connect to but there does not need to be one running on its own computer.
What this all means is that your computer is working perfectly fine. You are able to ssh
out to a remote server as long as you have networking.
In fact you should probably remove the openssh-server
package from your computer as if it is not being used all it would do is be a security risk.
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
add a comment |
What follows assumes that the computer on which you re-installed openssh-server
and from which you are ssh
ing is NOT "Ubuntu", the machine you accessing by means of ssh me@Ubuntu
.
I think that your problem is confusion about the difference between the ssh daemon and the ssh client. The ssh daemon (sshd
) is the program that allows you or others to ssh
into the machine that the daemon is running on. When you run sudo service ssh <whatever>
you are giving commands to sshd
, i.e. to start or stop or whatever.
The other piece of ssh is the ssh client. This is what you start whenever you run ssh somebody@host.name
in a terminal. This is a self-contained program that connects with the ssh daemon running on computer called "host.name
". For ssh
to work there must be an ssh daemon running on the computer it wants to connect to but there does not need to be one running on its own computer.
What this all means is that your computer is working perfectly fine. You are able to ssh
out to a remote server as long as you have networking.
In fact you should probably remove the openssh-server
package from your computer as if it is not being used all it would do is be a security risk.
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
add a comment |
What follows assumes that the computer on which you re-installed openssh-server
and from which you are ssh
ing is NOT "Ubuntu", the machine you accessing by means of ssh me@Ubuntu
.
I think that your problem is confusion about the difference between the ssh daemon and the ssh client. The ssh daemon (sshd
) is the program that allows you or others to ssh
into the machine that the daemon is running on. When you run sudo service ssh <whatever>
you are giving commands to sshd
, i.e. to start or stop or whatever.
The other piece of ssh is the ssh client. This is what you start whenever you run ssh somebody@host.name
in a terminal. This is a self-contained program that connects with the ssh daemon running on computer called "host.name
". For ssh
to work there must be an ssh daemon running on the computer it wants to connect to but there does not need to be one running on its own computer.
What this all means is that your computer is working perfectly fine. You are able to ssh
out to a remote server as long as you have networking.
In fact you should probably remove the openssh-server
package from your computer as if it is not being used all it would do is be a security risk.
What follows assumes that the computer on which you re-installed openssh-server
and from which you are ssh
ing is NOT "Ubuntu", the machine you accessing by means of ssh me@Ubuntu
.
I think that your problem is confusion about the difference between the ssh daemon and the ssh client. The ssh daemon (sshd
) is the program that allows you or others to ssh
into the machine that the daemon is running on. When you run sudo service ssh <whatever>
you are giving commands to sshd
, i.e. to start or stop or whatever.
The other piece of ssh is the ssh client. This is what you start whenever you run ssh somebody@host.name
in a terminal. This is a self-contained program that connects with the ssh daemon running on computer called "host.name
". For ssh
to work there must be an ssh daemon running on the computer it wants to connect to but there does not need to be one running on its own computer.
What this all means is that your computer is working perfectly fine. You are able to ssh
out to a remote server as long as you have networking.
In fact you should probably remove the openssh-server
package from your computer as if it is not being used all it would do is be a security risk.
edited Feb 6 '13 at 22:42
jdthood
10.6k24163
10.6k24163
answered Feb 6 '13 at 21:58
Alex L.Alex L.
2,7001319
2,7001319
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
add a comment |
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
I suppose I was a bit vague in my description above, but I am specifically talking about the ssh-server because I do, indeed, ssh in to this computer remotely. Specifically, I use ufw to ensure my mode of connections are well-managed, and would like, for instance, to edit my sshd_config to disable plaintext passphrase access, requiring ssh keys.
– Matt Senate
Feb 6 '13 at 22:09
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
Also, I changed some of the names to make my commands anonymous. I'm indeed ssh-ing into this box.
– Matt Senate
Feb 6 '13 at 22:10
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
@MattSenate Could you edit your question to add a hostname to each of the prompts. It is difficult to tell which commands are getting run on which computers.
– Alex L.
Feb 6 '13 at 22:49
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
Clarified above.
– Matt Senate
Feb 7 '13 at 0:00
add a comment |
@alex-l answer to me is right:
(as root)
service ssh status
service ssh stop
then check if the port is up (22)
netstat -nat
that's all
other thing that you can do to check if ereytinh is ok is do from other machine an
ssh -v user@ubuntu-machine
1
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service sincesudo service ssh status
orsudo service ssh stop
do nothing.
– Matt Senate
Feb 6 '13 at 23:59
ok, then do atailf /var/log/syslog
in a terminal (as root) and do sudoservice ssh stop
in another terminal and tell us whai it say in the first terminal.
– maniat1k
Feb 7 '13 at 11:11
Log said nothing as I did this:$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
add a comment |
@alex-l answer to me is right:
(as root)
service ssh status
service ssh stop
then check if the port is up (22)
netstat -nat
that's all
other thing that you can do to check if ereytinh is ok is do from other machine an
ssh -v user@ubuntu-machine
1
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service sincesudo service ssh status
orsudo service ssh stop
do nothing.
– Matt Senate
Feb 6 '13 at 23:59
ok, then do atailf /var/log/syslog
in a terminal (as root) and do sudoservice ssh stop
in another terminal and tell us whai it say in the first terminal.
– maniat1k
Feb 7 '13 at 11:11
Log said nothing as I did this:$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
add a comment |
@alex-l answer to me is right:
(as root)
service ssh status
service ssh stop
then check if the port is up (22)
netstat -nat
that's all
other thing that you can do to check if ereytinh is ok is do from other machine an
ssh -v user@ubuntu-machine
@alex-l answer to me is right:
(as root)
service ssh status
service ssh stop
then check if the port is up (22)
netstat -nat
that's all
other thing that you can do to check if ereytinh is ok is do from other machine an
ssh -v user@ubuntu-machine
answered Feb 6 '13 at 23:14
maniat1kmaniat1k
5,214103350
5,214103350
1
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service sincesudo service ssh status
orsudo service ssh stop
do nothing.
– Matt Senate
Feb 6 '13 at 23:59
ok, then do atailf /var/log/syslog
in a terminal (as root) and do sudoservice ssh stop
in another terminal and tell us whai it say in the first terminal.
– maniat1k
Feb 7 '13 at 11:11
Log said nothing as I did this:$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
add a comment |
1
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service sincesudo service ssh status
orsudo service ssh stop
do nothing.
– Matt Senate
Feb 6 '13 at 23:59
ok, then do atailf /var/log/syslog
in a terminal (as root) and do sudoservice ssh stop
in another terminal and tell us whai it say in the first terminal.
– maniat1k
Feb 7 '13 at 11:11
Log said nothing as I did this:$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
1
1
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service since
sudo service ssh status
or sudo service ssh stop
do nothing.– Matt Senate
Feb 6 '13 at 23:59
The problem is that I'm able to log in to the computer in question via ssh (even remotely), but I cannot manage the ssh service since
sudo service ssh status
or sudo service ssh stop
do nothing.– Matt Senate
Feb 6 '13 at 23:59
ok, then do a
tailf /var/log/syslog
in a terminal (as root) and do sudo service ssh stop
in another terminal and tell us whai it say in the first terminal.– maniat1k
Feb 7 '13 at 11:11
ok, then do a
tailf /var/log/syslog
in a terminal (as root) and do sudo service ssh stop
in another terminal and tell us whai it say in the first terminal.– maniat1k
Feb 7 '13 at 11:11
Log said nothing as I did this:
$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
Log said nothing as I did this:
$ sudo service ssh stop [sudo] password: stop: Unknown instance: $ sudo service ssh status ssh stop/waiting $ sudo service ssh start ssh stop/pre-start, process 15740
– Matt Senate
Feb 8 '13 at 1:02
add a comment |
It's worth knowing that as far as I know, the 'service ssh [stop|status]' command, applies to the process identified in /var/run/sshd.pid but the actual process listening can be identified by running 'sudo netstat -lpn |grep ssh' if they don't match, that'll be why the confusion is there.
On my machine this is what I see:-
root@babypuss:/var/www/middletier# ls /var/run/sshd.pid
/var/run/sshd.pid
root@babypuss:/var/www/middletier# cat /var/run/sshd.pid
10959
root@babypuss:/var/www/middletier# ps ax |grep sshd
10959 ? Ss 0:00 /usr/sbin/sshd -D
If the pid's don't match, then (as root) kill the running sshd process and start it again with 'service ssh start' to see what happens.
But as has been said before, if on the Ubuntu machine, you can run 'ps ax |grep sshd' and see nothing running, then check isn't not some kind of xinet type service by asserting via 'netstat -lpn |grep 22' that nothing is listening on port 22. If nothing is really listening, then the most likely problem is that the machine you're connecting to, from somewhere else, isn't the one you're looking at (so check the /etc/hosts file on @otherComputer).
If you're 90% sure it is connecting to the machine you think you are, then double check with 'netstat -n |grep -v ^unix' on each machine, to identify the actual connection, and the shell running on @Ubuntu when it's connected.
If you really can't see the listening service, be afraid. It could be a rootkit. Try shutting down the computer and attempting to reconnect, to be absolutely sure you're connecting to the machine you're worrying about.
add a comment |
It's worth knowing that as far as I know, the 'service ssh [stop|status]' command, applies to the process identified in /var/run/sshd.pid but the actual process listening can be identified by running 'sudo netstat -lpn |grep ssh' if they don't match, that'll be why the confusion is there.
On my machine this is what I see:-
root@babypuss:/var/www/middletier# ls /var/run/sshd.pid
/var/run/sshd.pid
root@babypuss:/var/www/middletier# cat /var/run/sshd.pid
10959
root@babypuss:/var/www/middletier# ps ax |grep sshd
10959 ? Ss 0:00 /usr/sbin/sshd -D
If the pid's don't match, then (as root) kill the running sshd process and start it again with 'service ssh start' to see what happens.
But as has been said before, if on the Ubuntu machine, you can run 'ps ax |grep sshd' and see nothing running, then check isn't not some kind of xinet type service by asserting via 'netstat -lpn |grep 22' that nothing is listening on port 22. If nothing is really listening, then the most likely problem is that the machine you're connecting to, from somewhere else, isn't the one you're looking at (so check the /etc/hosts file on @otherComputer).
If you're 90% sure it is connecting to the machine you think you are, then double check with 'netstat -n |grep -v ^unix' on each machine, to identify the actual connection, and the shell running on @Ubuntu when it's connected.
If you really can't see the listening service, be afraid. It could be a rootkit. Try shutting down the computer and attempting to reconnect, to be absolutely sure you're connecting to the machine you're worrying about.
add a comment |
It's worth knowing that as far as I know, the 'service ssh [stop|status]' command, applies to the process identified in /var/run/sshd.pid but the actual process listening can be identified by running 'sudo netstat -lpn |grep ssh' if they don't match, that'll be why the confusion is there.
On my machine this is what I see:-
root@babypuss:/var/www/middletier# ls /var/run/sshd.pid
/var/run/sshd.pid
root@babypuss:/var/www/middletier# cat /var/run/sshd.pid
10959
root@babypuss:/var/www/middletier# ps ax |grep sshd
10959 ? Ss 0:00 /usr/sbin/sshd -D
If the pid's don't match, then (as root) kill the running sshd process and start it again with 'service ssh start' to see what happens.
But as has been said before, if on the Ubuntu machine, you can run 'ps ax |grep sshd' and see nothing running, then check isn't not some kind of xinet type service by asserting via 'netstat -lpn |grep 22' that nothing is listening on port 22. If nothing is really listening, then the most likely problem is that the machine you're connecting to, from somewhere else, isn't the one you're looking at (so check the /etc/hosts file on @otherComputer).
If you're 90% sure it is connecting to the machine you think you are, then double check with 'netstat -n |grep -v ^unix' on each machine, to identify the actual connection, and the shell running on @Ubuntu when it's connected.
If you really can't see the listening service, be afraid. It could be a rootkit. Try shutting down the computer and attempting to reconnect, to be absolutely sure you're connecting to the machine you're worrying about.
It's worth knowing that as far as I know, the 'service ssh [stop|status]' command, applies to the process identified in /var/run/sshd.pid but the actual process listening can be identified by running 'sudo netstat -lpn |grep ssh' if they don't match, that'll be why the confusion is there.
On my machine this is what I see:-
root@babypuss:/var/www/middletier# ls /var/run/sshd.pid
/var/run/sshd.pid
root@babypuss:/var/www/middletier# cat /var/run/sshd.pid
10959
root@babypuss:/var/www/middletier# ps ax |grep sshd
10959 ? Ss 0:00 /usr/sbin/sshd -D
If the pid's don't match, then (as root) kill the running sshd process and start it again with 'service ssh start' to see what happens.
But as has been said before, if on the Ubuntu machine, you can run 'ps ax |grep sshd' and see nothing running, then check isn't not some kind of xinet type service by asserting via 'netstat -lpn |grep 22' that nothing is listening on port 22. If nothing is really listening, then the most likely problem is that the machine you're connecting to, from somewhere else, isn't the one you're looking at (so check the /etc/hosts file on @otherComputer).
If you're 90% sure it is connecting to the machine you think you are, then double check with 'netstat -n |grep -v ^unix' on each machine, to identify the actual connection, and the shell running on @Ubuntu when it's connected.
If you really can't see the listening service, be afraid. It could be a rootkit. Try shutting down the computer and attempting to reconnect, to be absolutely sure you're connecting to the machine you're worrying about.
answered Mar 26 '14 at 12:02
sibazsibaz
655515
655515
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f252153%2fcant-start-stop-or-interface-with-ssh-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
First, Ubuntu uses upstart. Second, what is the problem ?
– Panther
Feb 6 '13 at 21:27
The problem is that he can't stop the ssh service.
– jdthood
Feb 6 '13 at 21:56
1
@jdthood No. I think he just doesn't understand the difference between an ssh server and the ssh client.
– Alex L.
Feb 6 '13 at 22:02
@Alex: Ah, yes, that's possible. I was assuming that the machine named 'Ubuntu' was the one running
sshd
.– jdthood
Feb 6 '13 at 22:07
1
Alex got it right. In short, ssh service(
sshd
) and thessh
client command are different things. (ssh
is not a service)– lamino
Apr 8 '17 at 21:12