SSH refusing connection - “sshd: unrecognized service”
I am having an issue with SSH.
ssh: connect to host 192.168.1.7 port 22: Connection refused
I get the above error whenever I try to connect my desktop with another desktop using SSH, but I'm able to ping the other desktop successfully.
ssh: connect to host 192.168.1.7 port 22: Connection refused
When I attempt to restart sshd, it outputs the following error
sshd: unrecognized service
I can connect to remote server using SSH, but I'm not able to connect within the local network. How can I solve this issue?
networking ssh 12.10 sshd
|
show 1 more comment
I am having an issue with SSH.
ssh: connect to host 192.168.1.7 port 22: Connection refused
I get the above error whenever I try to connect my desktop with another desktop using SSH, but I'm able to ping the other desktop successfully.
ssh: connect to host 192.168.1.7 port 22: Connection refused
When I attempt to restart sshd, it outputs the following error
sshd: unrecognized service
I can connect to remote server using SSH, but I'm not able to connect within the local network. How can I solve this issue?
networking ssh 12.10 sshd
Please provide the command line you are using, or the application. Also add the Ubuntu version. Are these two desktops on the same LAN (local network)?
– david6
Feb 13 '13 at 7:42
1
How are you trying to start the ssh daemon? You should be usingsudo service ssh start
. If that doesn't work, could you post the output ofls -l /etc/init/ssh.conf
?
– Jeremy Kerr
Feb 13 '13 at 7:43
@david6, if they weren't on the same LAN, then the connection would just fail or be blackhole'd. He's getting a refused connection which means that a computer saw the request and sent back a refusal.
– Nathan J. Brauer
Feb 13 '13 at 9:18
Im using Ubuntu 12.10, where I need to ssh to another computer within the same local network. But, I'm able to connect to a remote server in another network. Please help me...
– Rudra
Feb 13 '13 at 9:19
Confirm if you are using a firewall. Is SSH server installed on each target host?
– david6
Feb 13 '13 at 10:39
|
show 1 more comment
I am having an issue with SSH.
ssh: connect to host 192.168.1.7 port 22: Connection refused
I get the above error whenever I try to connect my desktop with another desktop using SSH, but I'm able to ping the other desktop successfully.
ssh: connect to host 192.168.1.7 port 22: Connection refused
When I attempt to restart sshd, it outputs the following error
sshd: unrecognized service
I can connect to remote server using SSH, but I'm not able to connect within the local network. How can I solve this issue?
networking ssh 12.10 sshd
I am having an issue with SSH.
ssh: connect to host 192.168.1.7 port 22: Connection refused
I get the above error whenever I try to connect my desktop with another desktop using SSH, but I'm able to ping the other desktop successfully.
ssh: connect to host 192.168.1.7 port 22: Connection refused
When I attempt to restart sshd, it outputs the following error
sshd: unrecognized service
I can connect to remote server using SSH, but I'm not able to connect within the local network. How can I solve this issue?
networking ssh 12.10 sshd
networking ssh 12.10 sshd
edited Jan 20 at 21:00
Zanna
50.7k13136241
50.7k13136241
asked Feb 13 '13 at 7:06
RudraRudra
176238
176238
Please provide the command line you are using, or the application. Also add the Ubuntu version. Are these two desktops on the same LAN (local network)?
– david6
Feb 13 '13 at 7:42
1
How are you trying to start the ssh daemon? You should be usingsudo service ssh start
. If that doesn't work, could you post the output ofls -l /etc/init/ssh.conf
?
– Jeremy Kerr
Feb 13 '13 at 7:43
@david6, if they weren't on the same LAN, then the connection would just fail or be blackhole'd. He's getting a refused connection which means that a computer saw the request and sent back a refusal.
– Nathan J. Brauer
Feb 13 '13 at 9:18
Im using Ubuntu 12.10, where I need to ssh to another computer within the same local network. But, I'm able to connect to a remote server in another network. Please help me...
– Rudra
Feb 13 '13 at 9:19
Confirm if you are using a firewall. Is SSH server installed on each target host?
– david6
Feb 13 '13 at 10:39
|
show 1 more comment
Please provide the command line you are using, or the application. Also add the Ubuntu version. Are these two desktops on the same LAN (local network)?
– david6
Feb 13 '13 at 7:42
1
How are you trying to start the ssh daemon? You should be usingsudo service ssh start
. If that doesn't work, could you post the output ofls -l /etc/init/ssh.conf
?
– Jeremy Kerr
Feb 13 '13 at 7:43
@david6, if they weren't on the same LAN, then the connection would just fail or be blackhole'd. He's getting a refused connection which means that a computer saw the request and sent back a refusal.
– Nathan J. Brauer
Feb 13 '13 at 9:18
Im using Ubuntu 12.10, where I need to ssh to another computer within the same local network. But, I'm able to connect to a remote server in another network. Please help me...
– Rudra
Feb 13 '13 at 9:19
Confirm if you are using a firewall. Is SSH server installed on each target host?
– david6
Feb 13 '13 at 10:39
Please provide the command line you are using, or the application. Also add the Ubuntu version. Are these two desktops on the same LAN (local network)?
– david6
Feb 13 '13 at 7:42
Please provide the command line you are using, or the application. Also add the Ubuntu version. Are these two desktops on the same LAN (local network)?
– david6
Feb 13 '13 at 7:42
1
1
How are you trying to start the ssh daemon? You should be using
sudo service ssh start
. If that doesn't work, could you post the output of ls -l /etc/init/ssh.conf
?– Jeremy Kerr
Feb 13 '13 at 7:43
How are you trying to start the ssh daemon? You should be using
sudo service ssh start
. If that doesn't work, could you post the output of ls -l /etc/init/ssh.conf
?– Jeremy Kerr
Feb 13 '13 at 7:43
@david6, if they weren't on the same LAN, then the connection would just fail or be blackhole'd. He's getting a refused connection which means that a computer saw the request and sent back a refusal.
– Nathan J. Brauer
Feb 13 '13 at 9:18
@david6, if they weren't on the same LAN, then the connection would just fail or be blackhole'd. He's getting a refused connection which means that a computer saw the request and sent back a refusal.
– Nathan J. Brauer
Feb 13 '13 at 9:18
Im using Ubuntu 12.10, where I need to ssh to another computer within the same local network. But, I'm able to connect to a remote server in another network. Please help me...
– Rudra
Feb 13 '13 at 9:19
Im using Ubuntu 12.10, where I need to ssh to another computer within the same local network. But, I'm able to connect to a remote server in another network. Please help me...
– Rudra
Feb 13 '13 at 9:19
Confirm if you are using a firewall. Is SSH server installed on each target host?
– david6
Feb 13 '13 at 10:39
Confirm if you are using a firewall. Is SSH server installed on each target host?
– david6
Feb 13 '13 at 10:39
|
show 1 more comment
6 Answers
6
active
oldest
votes
Try un-installing and then installing openssh-server:
sudo apt-get remove openssh-client openssh-server
and then
sudo apt-get install openssh-client openssh-server
This worked for me. If you still can not connect, try
sudo ufw status verbose
and let us know what the output is.
I am having the same problem and the output ofsudo ufw status verbose
isstatus: inactive
, so I enabled it but the error persists, this is the new outputStatus: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
add a comment |
First make sure that ssh service running on 192.168.1.7 or not..it is possible that system doesn't have an SSH daemon, so you need to install ssh on that system.
sudo apt-get install openssh-server
If it's already installed, run sudo service ssh restart
, then comment here with the output of this command from both the systems.
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
add a comment |
In my installation of Ubuntu 14.04 LTS desktop edition from the Ubuntu website, openssh-server is not installed by default. BIG FAT THUMBS DOWN Canonical!!!!! The installation is relatively easy and has been mentioned already by other answers above:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install openssh-server
1
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
add a comment |
Check to make sure your router either, can accept ssh or has it enabled somewhere in the settings. Sometimes something this simple can be overlooked.
add a comment |
Goto
vim /etc/ssh/sshd_config
Change the Authentication "PermitRootLogin" to "yes"
Eg:
Authentication:
PermitRootLogin yes
service sshd restart
add a comment |
Check if you have SSH server installed:
dpkg -l openssh-server
If not, install it:
sudo apt update && sudo apt install -y ssh
Now check if your 22 port is in use:
netstat -atn | grep :22
add a comment |
protected by Zanna Jan 21 at 9:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try un-installing and then installing openssh-server:
sudo apt-get remove openssh-client openssh-server
and then
sudo apt-get install openssh-client openssh-server
This worked for me. If you still can not connect, try
sudo ufw status verbose
and let us know what the output is.
I am having the same problem and the output ofsudo ufw status verbose
isstatus: inactive
, so I enabled it but the error persists, this is the new outputStatus: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
add a comment |
Try un-installing and then installing openssh-server:
sudo apt-get remove openssh-client openssh-server
and then
sudo apt-get install openssh-client openssh-server
This worked for me. If you still can not connect, try
sudo ufw status verbose
and let us know what the output is.
I am having the same problem and the output ofsudo ufw status verbose
isstatus: inactive
, so I enabled it but the error persists, this is the new outputStatus: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
add a comment |
Try un-installing and then installing openssh-server:
sudo apt-get remove openssh-client openssh-server
and then
sudo apt-get install openssh-client openssh-server
This worked for me. If you still can not connect, try
sudo ufw status verbose
and let us know what the output is.
Try un-installing and then installing openssh-server:
sudo apt-get remove openssh-client openssh-server
and then
sudo apt-get install openssh-client openssh-server
This worked for me. If you still can not connect, try
sudo ufw status verbose
and let us know what the output is.
answered Mar 30 '13 at 18:33
user1521587user1521587
1514
1514
I am having the same problem and the output ofsudo ufw status verbose
isstatus: inactive
, so I enabled it but the error persists, this is the new outputStatus: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
add a comment |
I am having the same problem and the output ofsudo ufw status verbose
isstatus: inactive
, so I enabled it but the error persists, this is the new outputStatus: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
I am having the same problem and the output of
sudo ufw status verbose
is status: inactive
, so I enabled it but the error persists, this is the new output Status: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
I am having the same problem and the output of
sudo ufw status verbose
is status: inactive
, so I enabled it but the error persists, this is the new output Status: active Logging: off Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 22 ALLOW IN Anywhere (v6)
– Nishant
Nov 25 '14 at 14:26
add a comment |
First make sure that ssh service running on 192.168.1.7 or not..it is possible that system doesn't have an SSH daemon, so you need to install ssh on that system.
sudo apt-get install openssh-server
If it's already installed, run sudo service ssh restart
, then comment here with the output of this command from both the systems.
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
add a comment |
First make sure that ssh service running on 192.168.1.7 or not..it is possible that system doesn't have an SSH daemon, so you need to install ssh on that system.
sudo apt-get install openssh-server
If it's already installed, run sudo service ssh restart
, then comment here with the output of this command from both the systems.
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
add a comment |
First make sure that ssh service running on 192.168.1.7 or not..it is possible that system doesn't have an SSH daemon, so you need to install ssh on that system.
sudo apt-get install openssh-server
If it's already installed, run sudo service ssh restart
, then comment here with the output of this command from both the systems.
First make sure that ssh service running on 192.168.1.7 or not..it is possible that system doesn't have an SSH daemon, so you need to install ssh on that system.
sudo apt-get install openssh-server
If it's already installed, run sudo service ssh restart
, then comment here with the output of this command from both the systems.
edited Feb 13 '13 at 11:03
Nathan J. Brauer
87021129
87021129
answered Feb 13 '13 at 8:24
P4cK3tHuNt3RP4cK3tHuNt3R
1612
1612
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
add a comment |
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
When I restart the ssh it stops first and starts with a PID no.
– Rudra
Feb 13 '13 at 9:20
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
Thank you this seems to be precisely the case for me... openssh-server had to be installed on the target machine.
– Br. Sayan
Jun 13 '17 at 11:40
add a comment |
In my installation of Ubuntu 14.04 LTS desktop edition from the Ubuntu website, openssh-server is not installed by default. BIG FAT THUMBS DOWN Canonical!!!!! The installation is relatively easy and has been mentioned already by other answers above:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install openssh-server
1
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
add a comment |
In my installation of Ubuntu 14.04 LTS desktop edition from the Ubuntu website, openssh-server is not installed by default. BIG FAT THUMBS DOWN Canonical!!!!! The installation is relatively easy and has been mentioned already by other answers above:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install openssh-server
1
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
add a comment |
In my installation of Ubuntu 14.04 LTS desktop edition from the Ubuntu website, openssh-server is not installed by default. BIG FAT THUMBS DOWN Canonical!!!!! The installation is relatively easy and has been mentioned already by other answers above:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install openssh-server
In my installation of Ubuntu 14.04 LTS desktop edition from the Ubuntu website, openssh-server is not installed by default. BIG FAT THUMBS DOWN Canonical!!!!! The installation is relatively easy and has been mentioned already by other answers above:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install openssh-server
answered Jun 3 '14 at 20:48
MishaPMishaP
1012
1012
1
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
add a comment |
1
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
1
1
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
Many people don't use ssh. I think it's alright to not include the server by default on the desktop edition.
– ps95
May 9 '15 at 7:43
add a comment |
Check to make sure your router either, can accept ssh or has it enabled somewhere in the settings. Sometimes something this simple can be overlooked.
add a comment |
Check to make sure your router either, can accept ssh or has it enabled somewhere in the settings. Sometimes something this simple can be overlooked.
add a comment |
Check to make sure your router either, can accept ssh or has it enabled somewhere in the settings. Sometimes something this simple can be overlooked.
Check to make sure your router either, can accept ssh or has it enabled somewhere in the settings. Sometimes something this simple can be overlooked.
answered Nov 30 '15 at 4:51
BudsBuds
1
1
add a comment |
add a comment |
Goto
vim /etc/ssh/sshd_config
Change the Authentication "PermitRootLogin" to "yes"
Eg:
Authentication:
PermitRootLogin yes
service sshd restart
add a comment |
Goto
vim /etc/ssh/sshd_config
Change the Authentication "PermitRootLogin" to "yes"
Eg:
Authentication:
PermitRootLogin yes
service sshd restart
add a comment |
Goto
vim /etc/ssh/sshd_config
Change the Authentication "PermitRootLogin" to "yes"
Eg:
Authentication:
PermitRootLogin yes
service sshd restart
Goto
vim /etc/ssh/sshd_config
Change the Authentication "PermitRootLogin" to "yes"
Eg:
Authentication:
PermitRootLogin yes
service sshd restart
edited Mar 17 '16 at 13:15
Mostafa Ahangarha
2,62652243
2,62652243
answered Mar 17 '16 at 12:01
suryalegend89suryalegend89
1
1
add a comment |
add a comment |
Check if you have SSH server installed:
dpkg -l openssh-server
If not, install it:
sudo apt update && sudo apt install -y ssh
Now check if your 22 port is in use:
netstat -atn | grep :22
add a comment |
Check if you have SSH server installed:
dpkg -l openssh-server
If not, install it:
sudo apt update && sudo apt install -y ssh
Now check if your 22 port is in use:
netstat -atn | grep :22
add a comment |
Check if you have SSH server installed:
dpkg -l openssh-server
If not, install it:
sudo apt update && sudo apt install -y ssh
Now check if your 22 port is in use:
netstat -atn | grep :22
Check if you have SSH server installed:
dpkg -l openssh-server
If not, install it:
sudo apt update && sudo apt install -y ssh
Now check if your 22 port is in use:
netstat -atn | grep :22
answered Jan 20 at 21:27
blkpwsblkpws
663611
663611
add a comment |
add a comment |
protected by Zanna Jan 21 at 9:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Please provide the command line you are using, or the application. Also add the Ubuntu version. Are these two desktops on the same LAN (local network)?
– david6
Feb 13 '13 at 7:42
1
How are you trying to start the ssh daemon? You should be using
sudo service ssh start
. If that doesn't work, could you post the output ofls -l /etc/init/ssh.conf
?– Jeremy Kerr
Feb 13 '13 at 7:43
@david6, if they weren't on the same LAN, then the connection would just fail or be blackhole'd. He's getting a refused connection which means that a computer saw the request and sent back a refusal.
– Nathan J. Brauer
Feb 13 '13 at 9:18
Im using Ubuntu 12.10, where I need to ssh to another computer within the same local network. But, I'm able to connect to a remote server in another network. Please help me...
– Rudra
Feb 13 '13 at 9:19
Confirm if you are using a firewall. Is SSH server installed on each target host?
– david6
Feb 13 '13 at 10:39