You are not logged in.

#1 2010-08-26 08:46:50

godtuti
Member
Registered: 2010-08-21
Posts: 55

[SOLVED] Cant getting ssh working right

Hi, i followed the wiki page on setting up ssh and its not working right.i keep getting errors like remote closed session when i try to connect.

im really only going to be using this ssh inside a router and i want password authentication. can someone help me with this?

Last edited by godtuti (2010-08-31 17:43:44)

Offline

#2 2010-08-26 09:13:09

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED] Cant getting ssh working right

Without more details, only a psychic could help you.

Tell us what you're trying to do and what error messages you've gotten, as well as what configuration you've done.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-08-26 10:18:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Cant getting ssh working right

Offline

#4 2010-08-26 10:42:28

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Cant getting ssh working right

hosts.allow?

btw keys are better even on a internal network.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2010-08-26 22:17:16

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

ngoonee wrote:

Without more details, only a psychic could help you.

Tell us what you're trying to do and what error messages you've gotten, as well as what configuration you've done.


sorry, im not sure what info to put so i insist people helping me will ask for what info they need, im trying to setup a ssh port on my desktop so i can ssh into from my phone.

Offline

#6 2010-08-26 22:18:50

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

Mr.Elendig wrote:

hosts.allow?

btw keys are better even on a internal network.

could you tell me how to configure that file to let my lan try to connect?

Offline

#7 2010-08-26 22:25:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Cant getting ssh working right

godtuti please read the documentation before asking questions: http://wiki.archlinux.org/index.php/SSH … _others_in


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2010-08-26 22:26:33

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

jasonwryan wrote:

godtuti please read the documentation before asking questions: http://wiki.archlinux.org/index.php/SSH … _others_in

i read that whole wiki about ssh and that part didnt make sense to me... do i have to uncomment my choice?

Offline

#9 2010-08-26 22:26:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Cant getting ssh working right

godtuti wrote:
Mr.Elendig wrote:

hosts.allow?

btw keys are better even on a internal network.

could you tell me how to configure that file to let my lan try to connect?

man hosts.allow :-)

Offline

#10 2010-08-26 22:32:06

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

karol wrote:
godtuti wrote:
Mr.Elendig wrote:

hosts.allow?

btw keys are better even on a internal network.

could you tell me how to configure that file to let my lan try to connect?

man hosts.allow :-)

Huh?

Offline

#11 2010-08-26 22:33:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Cant getting ssh working right

The Fine Wiki wrote:

Allowing others in
Note: You have to adjust this file to remotely connect to your machine since the file is empty by default
To let other people ssh to your machine you need to adjust /etc/hosts.allow, add the following:
# let everyone connect to you
sshd: ALL

# OR you can restrict it to a certain ip
sshd: 192.168.0.1

# OR restrict for an IP range
sshd: 10.0.0.0/255.255.255.0

# OR restrict for an IP match
sshd: 192.168.1.
Now you should check your /etc/hosts.deny for the following line and make sure it looks like this:
ALL: ALL: DENY
That's it. You can SSH out and others should be able to SSH in smile.

So, assuming you are on a 10.0.0.0 network, just add "sshd: 10.0.0.0/255.255.255.0", or a 192.168.0.0 network: "sshd: 192.168.0.0/255.255.255.0"

"sshd: 10.0.0."  or "sshd: 192.168.0."  would also work.

Last edited by Mr.Elendig (2010-08-26 22:36:24)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2010-08-26 22:37:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Cant getting ssh working right

godtuti wrote:
karol wrote:
godtuti wrote:

could you tell me how to configure that file to let my lan try to connect?

man hosts.allow :-)

Huh?

There's a manpage called hosts_access(5), but you can get it by invoking 'man hosts.allow' too.

Offline

#13 2010-08-26 22:43:55

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

so i changed my host.allow to "sshd: 192.168.0.0/255.255.255.0" because im using 192.168, i restart the daemon i try to ssh in from my phone and i get the error "remote closed the connection"

Offline

#14 2010-08-27 16:17:12

medianmajik
Member
Registered: 2010-05-27
Posts: 53

Re: [SOLVED] Cant getting ssh working right

How about you use a pastebin to post your configs including /etc/hosts.deny, /etc/hosts.allow, sshd, and the config for your phone so you can use them as a reference

Be sure to fire up a terminal and look at man pages.


One thing at a time

Offline

#15 2010-08-28 18:04:38

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

medianmajik wrote:

How about you use a pastebin to post your configs including /etc/hosts.deny, /etc/hosts.allow, sshd, and the config for your phone so you can use them as a reference

Be sure to fire up a terminal and look at man pages.



http://pastebin.com/wXhRSq7z

Offline

#16 2010-08-28 21:47:18

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

Anyone?

Offline

#17 2010-08-29 16:17:15

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: [SOLVED] Cant getting ssh working right

My hosts.allow looks like this:

#
# /etc/hosts.allow
#
# let everyone connect to you
#sshd: ALL

# OR you can restrict it to a certain ip
#sshd: 192.168.0.1

# OR restrict for an IP range
#sshd: 10.0.0.0/255.255.255.0

# OR restrict for an IP match
sshd: 192.168.0.

# End of file

Your hosts.deny is like mine and you have an error in your sshd_config. Line 55 should not be on a separate line - it is supposed to be on the end of line 54.

You have:

...
#AuthorizedKeysFile     .ssh/authorized_keys
 
# For this to work you will also need host keys in
/etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
...

It is supposed to be:

...
#AuthorizedKeysFile     .ssh/authorized_keys
 
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
...

Try removing the error and changing your hosts.allow to mine. This is the solution mentioned in the second part of Mr.Elendig's post (#11) above. Did you try it?

Last edited by BaconPie (2010-08-29 16:19:12)

Offline

#18 2010-08-30 01:28:00

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

changed my host.allow back to sshd: 192.168.0.0/255.255.255.0 with all the stuff from yours, fixed the error, still saying remote closed connection

Offline

#19 2010-08-30 01:29:39

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: [SOLVED] Cant getting ssh working right

godtuti wrote:

changed my host.allow back to sshd: 192.168.0.0/255.255.255.0

I said to change it to:

sshd: 192.168.0.

Also, did you restart the daemon?

By the way, what's the address of your router? Are you sure you're on a 192.168.0.* network and not a 192.168.1.*?

Last edited by BaconPie (2010-08-30 01:31:04)

Offline

#20 2010-08-31 02:23:55

godtuti
Member
Registered: 2010-08-21
Posts: 55

Re: [SOLVED] Cant getting ssh working right

i looked at my configs and fixed some things that didnt look right such as my host.allow, it works now big_smile.. thank you  to everyone who helped out.. just two more questions. how do i secure my ssh and how do i mark this topic as solved?

Offline

#21 2010-08-31 10:44:19

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: [SOLVED] Cant getting ssh working right

godtuti wrote:

i looked at my configs and fixed some things that didnt look right such as my host.allow, it works now big_smile.. thank you  to everyone who helped out.. just two more questions. how do i secure my ssh and how do i mark this topic as solved?

You edit your first post and ssh is already secure. Secure Shell Wiki.

Last edited by BaconPie (2010-08-31 10:44:34)

Offline

Board footer

Powered by FluxBB