# ssh i surrender to you, take my wife and kill my children

## Schmolch

Hi all!

I was able to get past the Authentication with password-based or public-key-based.

But what follows is always the same:

debug1: Authentication succeeded (password).

debug1: channel 0: new [client-session]

debug1: Entering interactive session.

debug1: channel 0: request pty-req

debug1: channel 0: request shell

debug1: channel 0: open confirm rwindow 0 rmax 32768

debug1: channel 0: rcvd eof

debug1: channel 0: output open -> drain

debug1: channel 0: obuf empty

debug1: channel 0: close_write

debug1: channel 0: output drain -> closed

debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

debug1: channel 0: rcvd close

debug1: channel 0: close_read

debug1: channel 0: input open -> closed

debug1: channel 0: almost dead

debug1: channel 0: gc: notify user

debug1: channel 0: gc: user detached

debug1: channel 0: send close

debug1: channel 0: is dead

debug1: channel 0: garbage collecting

debug1: channel_free: channel 0: client-session, nchannels 1

Connection to mymachine closed.

debug1: Transferred: stdin 0, stdout 0, stderr 33 bytes in 0.1 seconds

debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 425.1

debug1: Exit status 1

does anyone know what that means???

thx a lot!

----------

## neilhwatson

1. Have you checked the logs (/var/log)?

2. Have you tried turning the debugging higher (ssh -vvv)?

----------

## Schmolch

Hi and thx for your help  :Smile: 

ok i looked into the logs on the server.

I dunno why the logs dont get updated when i try to ssh today, the last log entries are from yesterday.

and there are errors:

[sshd] Accepted password for sascha from 192.168.1.2 port 42817

[sshd] error: openpty: No such file or directory

[sshd] error: session_pty_req: session 0 alloc failed

on the client, the -vvv shows a little more:

debug1: Authentication succeeded (publickey).

debug1: channel 0: new [client-session]

debug3: ssh_session2_open: channel_new: 0

debug2: channel 0: send open

debug1: Entering interactive session.

debug2: callback start

debug2: ssh_session2_setup: id 0

debug1: channel 0: request pty-req

debug3: tty_make_modes: ospeed 38400

debug3: tty_make_modes: ispeed 38400

debug3: tty_make_modes: 1 3

debug3: tty_make_modes: 2 28

debug3: tty_make_modes: 3 127

debug3: tty_make_modes: 4 21

debug3: tty_make_modes: 5 4

debug3: tty_make_modes: 6 255

debug3: tty_make_modes: 7 255

debug3: tty_make_modes: 8 17

debug3: tty_make_modes: 9 19

debug3: tty_make_modes: 10 26

debug3: tty_make_modes: 12 18

debug3: tty_make_modes: 13 23

debug3: tty_make_modes: 14 22

debug3: tty_make_modes: 18 15

debug3: tty_make_modes: 30 0

debug3: tty_make_modes: 31 0

debug3: tty_make_modes: 32 0

debug3: tty_make_modes: 33 0

debug3: tty_make_modes: 34 0

debug3: tty_make_modes: 35 0

debug3: tty_make_modes: 36 1

debug3: tty_make_modes: 37 0

debug3: tty_make_modes: 38 1

debug3: tty_make_modes: 39 1

debug3: tty_make_modes: 40 0

debug3: tty_make_modes: 41 1

debug3: tty_make_modes: 50 1

debug3: tty_make_modes: 51 1

debug3: tty_make_modes: 52 0

debug3: tty_make_modes: 53 1

debug3: tty_make_modes: 54 1

debug3: tty_make_modes: 55 1

debug3: tty_make_modes: 56 0

debug3: tty_make_modes: 57 0

debug3: tty_make_modes: 58 0

debug3: tty_make_modes: 59 1

debug3: tty_make_modes: 60 1

debug3: tty_make_modes: 61 1

debug3: tty_make_modes: 62 0

debug3: tty_make_modes: 70 1

debug3: tty_make_modes: 71 0

debug3: tty_make_modes: 72 1

debug3: tty_make_modes: 73 0

debug3: tty_make_modes: 74 0

debug3: tty_make_modes: 75 0

debug3: tty_make_modes: 90 1

debug3: tty_make_modes: 91 1

debug3: tty_make_modes: 92 0

debug3: tty_make_modes: 93 0

debug1: channel 0: request shell

debug2: callback done

debug1: channel 0: open confirm rwindow 0 rmax 32768

debug2: channel 0: rcvd adjust 131072

debug1: channel 0: rcvd eof

debug1: channel 0: output open -> drain

debug1: channel 0: obuf empty

debug1: channel 0: close_write

debug1: channel 0: output drain -> closed

debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

debug1: channel 0: rcvd close

debug1: channel 0: close_read

debug1: channel 0: input open -> closed

debug3: channel 0: will not send data after close

debug1: channel 0: almost dead

debug1: channel 0: gc: notify user

debug1: channel 0: gc: user detached

debug1: channel 0: send close

debug1: channel 0: is dead

debug1: channel 0: garbage collecting

debug1: channel_free: channel 0: client-session, nchannels 1

debug3: channel_free: status: The following connections are open:\015

  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1)\015

debug3: channel_close_fds: channel 0: r -1 w -1 e 6

Connection to mymachine closed.

debug1: Transferred: stdin 0, stdout 0, stderr 33 bytes in 0.1 seconds

debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 288.2

debug1: Exit status 1

----------

## neilhwatson

Can you login on the server locally (at the console) using the same account?

----------

## Schmolch

no, everything is exactly the same.

tried with root and user, with password and public-key.

After "authentication suceeded" its always the same stuff.

I was hoping the "openpty: no such file or directory" would be the problem.

Did i forget to install something?

edit: oh and btw, my server is running iptables with masq, and samba.. but nothing else.

----------

## neilhwatson

You misunderstand me.  You are trying to login to a server from a client using the command:

```
ssh <username>@<host or ip>
```

Does the account <username> work if you physically walk to the server and login at the console?

Also, what if you create a new user account and try that one (in case the other is funny).

----------

## neilhwatson

Google is your friend:

 *Quote:*   

> I'm guessing here, but do you have the devfs /dev/ptyXX stuff turned on in your kernel?  If not, try activating it

 

----------

## Schmolch

yes i did understand you and it doesnt work.

neither can i login from the client nor from the server (locally).

neither as root nor as user (created on the server).

I have

[*]/dev/pts file system for UNIX98 PTYs

in my kernel, is this the implied option?

----------

## neilhwatson

So you can't login locally as any user?

My kernel config file shows:

CONFIG_UNIX98_PTYS=y

CONFIG_UNIX98_PTY_COUNT=256

CONFIG_DEVFS_FS=y

CONFIG_DEVFS_MOUNT=y

----------

## Schmolch

 *neilhwatson wrote:*   

> So you can't login locally as any user?

 

exactly!

 *neilhwatson wrote:*   

> 
> 
> My kernel config file shows:
> 
> CONFIG_UNIX98_PTYS=y
> ...

 

i dont have the automount at boot... do i need it in this special case maybe..?

Well.. since you asked for the logs i didnt know about the "openpty: no such file"-error.. maybe i can find something about this error... but google is not returning much about this.

----------

## neilhwatson

 *Schmolch wrote:*   

> 
> 
> i dont have the automount at boot... do i need it in this special case maybe..?

 

I believe you do.  Let's recap.  In truth, you can't login to the machine either remotely or locally?  Were you ever able to?  If so, what has changed since that time?

----------

## Schmolch

its the first time i try to run ssh.

i will compile automount at boot into the kernel, will take a while on this k6.

at the moment im remerging openssh, some1 from irc advised me to do so.

and yes, in truth i neither can login from the client nor from the server locally.. 

The server is just 20cm next to the client, so im not to lazy to walk to the server   :Wink: 

----------

## Schmolch

Damn, remerging openssh and "automount dev-fs at boot" didnt make any difference.

----------

## Schmolch

its working now!

because i had some trouble to reach a few websites i disabled my iptables-firewall.

im new to iptables and just used a rule which the site i got it from said it would simply block whats coming from outside...

Well this rule was the reason ssh did not work.

thx for your help! :Smile: 

----------

