Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Trap full -- please empty.


computers / comp.sys.raspberry-pi / SSH log file location

SubjectAuthor
* SSH log file locationbob prohaska
+* Re: SSH log file locationTheo
|`- Re: SSH log file locationJim Jackson
`* Re: SSH log file locationKnute Johnson
 `* Re: SSH log file locationbob prohaska
  +- Re: SSH log file locationKnute Johnson
  +- Re: SSH log file locationTheo
  +* Re: SSH log file locationRichard Kettlewell
  |`- Re: SSH log file locationbob prohaska
  `- Re: SSH log file locationLawrence D'Oliveiro

1
SSH log file location

<unrhfc$3g146$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8770&group=comp.sys.raspberry-pi#8770

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bp@www.zefox.net (bob prohaska)
Newsgroups: comp.sys.raspberry-pi
Subject: SSH log file location
Date: Fri, 12 Jan 2024 14:14:05 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <unrhfc$3g146$1@dont-email.me>
Injection-Date: Fri, 12 Jan 2024 14:14:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a745b7b38da313da4e3a1955e6b1ead9";
logging-data="3671174"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++I4YNFHsZgVBJliGovaKbP0dmt32lkx0="
Summary: Where are RasPiOS ssh logs?
Keywords: ssh sshd logs debian
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.4-STABLE (arm))
Cancel-Lock: sha1:YS7E0bwuKrPeD9W44Ugon1htwWk=
 by: bob prohaska - Fri, 12 Jan 2024 14:14 UTC

Where does RasPiOS put log files related to ssh connections?

I've got a Pi4 that's dropping individual ssh connections. One
particular connection out of a dozen or so drops, so it's
probably related to the server end, not the client.

It'd be helpful to examine the client log for clues, but
the logging setup on RasPiOS is very different from
BSD and and I'm unsure where to look.

The only message displayed on LxTerminal at the RasPiOS end is

......
client_loop: send disconnect: Broken pipe
......

Thanks for reading, and any guidance!

bob prohaska

Re: SSH log file location

<Kkc*rmfAz@news.chiark.greenend.org.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8771&group=comp.sys.raspberry-pi#8771

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+news@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: 12 Jan 2024 14:27:16 +0000 (GMT)
Organization: University of Cambridge, England
Message-ID: <Kkc*rmfAz@news.chiark.greenend.org.uk>
References: <unrhfc$3g146$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="9958"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Fri, 12 Jan 2024 14:27 UTC

bob prohaska <bp@www.zefox.net> wrote:
> Where does RasPiOS put log files related to ssh connections?
>
> I've got a Pi4 that's dropping individual ssh connections. One
> particular connection out of a dozen or so drops, so it's
> probably related to the server end, not the client.
>
> It'd be helpful to examine the client log for clues, but
> the logging setup on RasPiOS is very different from
> BSD and and I'm unsure where to look.
>
> The only message displayed on LxTerminal at the RasPiOS end is
>
> .....
> client_loop: send disconnect: Broken pipe
> .....
>
> Thanks for reading, and any guidance!

It's normally in /var/log/auth.log, but that's for the setup part of SSH
where it does authentication. Otherwise in general syslog, as accessed via
'journalctl'. You can increase the amount of debug logging in
/etc/ssh/sshd_config

But usually a broken pipe means the TCP socket dropped for some reason,
which is not the fault of SSH. It can be due to aggressive timeouts on NAT
routers - mobile networks are notorious for that. Search for 'ssh
keepalive' for details of how to make SSH send null packets back and forth
every so often to prevent timeouts.

It could also be wifi related, if the wifi dropped out for some while then
eventually the TCP connection would drop.

If you affected by TCP drops, 'mosh' is a tool that runs on top of SSH that
automatically reconnects and maintains the connection as it was before. It
also does things like caching keystrokes and replaying them when the
connection comes back up.

Theo

Re: SSH log file location

<unria5$3g48u$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8772&group=comp.sys.raspberry-pi#8772

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: knute2023@585ranch.com (Knute Johnson)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Fri, 12 Jan 2024 08:28:21 -0600
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <unria5$3g48u$1@dont-email.me>
References: <unrhfc$3g146$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 12 Jan 2024 14:28:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="16e74f76509592a5648c3c2c572adad4";
logging-data="3674398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19T1TzCwjAIoddYVgWtDLAw"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:4TbpyPnAHLn7wJMyCTl1NVR7mwA=
In-Reply-To: <unrhfc$3g146$1@dont-email.me>
Content-Language: en-US
 by: Knute Johnson - Fri, 12 Jan 2024 14:28 UTC

On 1/12/24 08:14, bob prohaska wrote:
> Where does RasPiOS put log files related to ssh connections?
>
> I've got a Pi4 that's dropping individual ssh connections. One
> particular connection out of a dozen or so drops, so it's
> probably related to the server end, not the client.
>
> It'd be helpful to examine the client log for clues, but
> the logging setup on RasPiOS is very different from
> BSD and and I'm unsure where to look.
>
> The only message displayed on LxTerminal at the RasPiOS end is
>
> .....
> client_loop: send disconnect: Broken pipe
> .....
>
> Thanks for reading, and any guidance!
>
> bob prohaska
>

In the journal.

journalctl -u ssh

will get you what you want. Also be sure to look at the man page for
journalctl.

--

Knute Johnson

Re: SSH log file location

<unrkph$3gh0o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8773&group=comp.sys.raspberry-pi#8773

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bp@www.zefox.net (bob prohaska)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Fri, 12 Jan 2024 15:10:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <unrkph$3gh0o$1@dont-email.me>
References: <unrhfc$3g146$1@dont-email.me> <unria5$3g48u$1@dont-email.me>
Injection-Date: Fri, 12 Jan 2024 15:10:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a745b7b38da313da4e3a1955e6b1ead9";
logging-data="3687448"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19npa9nvPxmn1Ys2g90ePfjxwyg7zUUugI="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.4-STABLE (arm))
Cancel-Lock: sha1:/TAyPdhYY2Ha5x8DLU8nkRSecXA=
 by: bob prohaska - Fri, 12 Jan 2024 15:10 UTC

Knute Johnson <knute2023@585ranch.com> wrote:
> On 1/12/24 08:14, bob prohaska wrote:
>> Where does RasPiOS put log files related to ssh connections?
>>
>> I've got a Pi4 that's dropping individual ssh connections. One
>> particular connection out of a dozen or so drops, so it's
>> probably related to the server end, not the client.
>>
>> It'd be helpful to examine the client log for clues, but
>> the logging setup on RasPiOS is very different from
>> BSD and and I'm unsure where to look.
>>
>> The only message displayed on LxTerminal at the RasPiOS end is
>>
>> .....
>> client_loop: send disconnect: Broken pipe
>> .....
>>
>> Thanks for reading, and any guidance!
>>
>> bob prohaska
>>
>
> In the journal.
>
> journalctl -u ssh
>
> will get you what you want. Also be sure to look at the man page for
> journalctl.

That's a good start. The -u ssh arguments seem to produce records
of ssh server activity but nothing about outgoing client connections.
In my case the problem is with an outgoing (client) session. The
journalctl -u ssh command reported no ssh client activity at all.
Is there a list of valid unit names somewhere?

Many thanks!

bob prohaska

Re: SSH log file location

<unrm39$3gmna$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8774&group=comp.sys.raspberry-pi#8774

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: knute2023@585ranch.com (Knute Johnson)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Fri, 12 Jan 2024 09:32:57 -0600
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <unrm39$3gmna$1@dont-email.me>
References: <unrhfc$3g146$1@dont-email.me> <unria5$3g48u$1@dont-email.me>
<unrkph$3gh0o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 12 Jan 2024 15:32:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="16e74f76509592a5648c3c2c572adad4";
logging-data="3693290"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+31sjjM8ynbBPcTsbZurcV"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:kaD9Z/GvHNJw7ixFtyBpduAqIbE=
In-Reply-To: <unrkph$3gh0o$1@dont-email.me>
Content-Language: en-US
 by: Knute Johnson - Fri, 12 Jan 2024 15:32 UTC

On 1/12/24 09:10, bob prohaska wrote:
>
> Is there a list of valid unit names somewhere?
>
> Many thanks!
>
> bob prohaska
>

If you find it, please post it here.

--

Knute Johnson

Re: SSH log file location

<Nkc*6OfAz@news.chiark.greenend.org.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8775&group=comp.sys.raspberry-pi#8775

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+news@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: 12 Jan 2024 16:29:31 +0000 (GMT)
Organization: University of Cambridge, England
Message-ID: <Nkc*6OfAz@news.chiark.greenend.org.uk>
References: <unrhfc$3g146$1@dont-email.me> <unria5$3g48u$1@dont-email.me> <unrkph$3gh0o$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="18098"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Fri, 12 Jan 2024 16:29 UTC

bob prohaska <bp@www.zefox.net> wrote:
> That's a good start. The -u ssh arguments seem to produce records
> of ssh server activity but nothing about outgoing client connections.
> In my case the problem is with an outgoing (client) session. The
> journalctl -u ssh command reported no ssh client activity at all.

Ah, you didn't make it clear it was the client. Try:

ssh -vvv user@host

Re: SSH log file location

<wwvply68pqq.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8776&group=comp.sys.raspberry-pi#8776

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Fri, 12 Jan 2024 16:45:33 +0000
Organization: terraraq NNTP server
Message-ID: <wwvply68pqq.fsf@LkoBDZeT.terraraq.uk>
References: <unrhfc$3g146$1@dont-email.me> <unria5$3g48u$1@dont-email.me>
<unrkph$3gh0o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="96888"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:/FBmT6WvdF5Kb8Rii5dDZU+d8oY=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Fri, 12 Jan 2024 16:45 UTC

bob prohaska <bp@www.zefox.net> writes:
> That's a good start. The -u ssh arguments seem to produce records
> of ssh server activity but nothing about outgoing client connections.
> In my case the problem is with an outgoing (client) session. The
> journalctl -u ssh command reported no ssh client activity at all.

The client doesn’t normally log to the journal. Run your client with
‘ssh -vvv’ for debug logging from the client . However Theo has already
interpreted the diagnostic; you’re probably not going to get much more
out of it than that.

Server logging seems to be quite thin by default. You could try
increasing the LogLevel in /etc/ssh/sshd_config (see ‘man sshd_config’
for possible values). You’ll need to restart the server for this to take
effect (systemctl restart ssh).

However, empirically, it doesn’t seem to have much to say when a
connection is terminated abnormally, so don’t get your hopes up.

I think Theo is probably right about what’s going on here.

> Is there a list of valid unit names somewhere?

systemctl list-units

--
https://www.greenend.org.uk/rjk/

Re: SSH log file location

<unt0fb$3q2fm$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8777&group=comp.sys.raspberry-pi#8777

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Sat, 13 Jan 2024 03:36:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <unt0fb$3q2fm$1@dont-email.me>
References: <unrhfc$3g146$1@dont-email.me> <unria5$3g48u$1@dont-email.me>
<unrkph$3gh0o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 13 Jan 2024 03:36:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="36aed737a78cea37aea56d6cd29b20ce";
logging-data="4000246"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B+Rxnz/PaTxXUd8IBFojK"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:7zVriwUPNo4QeNaxfoCdw2nTmpE=
 by: Lawrence D'Oliv - Sat, 13 Jan 2024 03:36 UTC

On Fri, 12 Jan 2024 15:10:42 -0000 (UTC), bob prohaska wrote:

> Is there a list of valid unit names somewhere?

systemctl list-unit-files

Re: SSH log file location

<slrnuq5rpi.2rm.jj@iridium.wf32df>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8778&group=comp.sys.raspberry-pi#8778

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jj@franjam.org.uk (Jim Jackson)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Sat, 13 Jan 2024 20:14:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <slrnuq5rpi.2rm.jj@iridium.wf32df>
References: <unrhfc$3g146$1@dont-email.me>
<Kkc*rmfAz@news.chiark.greenend.org.uk>
Injection-Date: Sat, 13 Jan 2024 20:14:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2bea8aae4aaa605778246bb171f5f313";
logging-data="92633"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eoXVWufcc7uVmB+r8cewIBj0J3a7cOps="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:SLb3oeHQUDQpi9ofTSJArarpIRA=
 by: Jim Jackson - Sat, 13 Jan 2024 20:14 UTC

On 2024-01-12, Theo <theom+news@chiark.greenend.org.uk> wrote:
> bob prohaska <bp@www.zefox.net> wrote:
>> I've got a Pi4 that's dropping individual ssh connections. One
>> particular connection out of a dozen or so drops, so it's
>> probably related to the server end, not the client.
>
....snip...
>
> But usually a broken pipe means the TCP socket dropped for some reason,
> which is not the fault of SSH. It can be due to aggressive timeouts on NAT
> routers - mobile networks are notorious for that. Search for 'ssh
> keepalive' for details of how to make SSH send null packets back and forth
> every so often to prevent timeouts.

I have

ServerAliveInterval 30

in my ~/.ssh/config in the header so it is set for all my connections,
precisely because some of my connections were being dropped because of
inactivity causing an intermediate firewall/router to close down the
connection.

It's been that way for longer than I care to remember, so my memory is a
bit dim, but I know I played around with some other options that didn't
always seem to work.

>
> It could also be wifi related, if the wifi dropped out for some while then
> eventually the TCP connection would drop.
>
> If you affected by TCP drops, 'mosh' is a tool that runs on top of SSH that
> automatically reconnects and maintains the connection as it was before. It
> also does things like caching keystrokes and replaying them when the
> connection comes back up.
>
> Theo

Re: SSH log file location

<unv1ta$4150$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8779&group=comp.sys.raspberry-pi#8779

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bp@www.zefox.net (bob prohaska)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: SSH log file location
Date: Sat, 13 Jan 2024 22:12:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <unv1ta$4150$1@dont-email.me>
References: <unrhfc$3g146$1@dont-email.me> <unria5$3g48u$1@dont-email.me> <unrkph$3gh0o$1@dont-email.me> <wwvply68pqq.fsf@LkoBDZeT.terraraq.uk>
Injection-Date: Sat, 13 Jan 2024 22:12:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="daffd8a1ca77922bca90aaa8882910d9";
logging-data="132256"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19E+NM6BfBiTENUV3CtH19PiYek7YETmPk="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.4-STABLE (arm))
Cancel-Lock: sha1:HpJYdLBHgjORMkwx1f29V4w6Jco=
 by: bob prohaska - Sat, 13 Jan 2024 22:12 UTC

Richard Kettlewell <invalid@invalid.invalid> wrote:
> bob prohaska <bp@www.zefox.net> writes:
>> That's a good start. The -u ssh arguments seem to produce records
>> of ssh server activity but nothing about outgoing client connections.
>> In my case the problem is with an outgoing (client) session. The
>> journalctl -u ssh command reported no ssh client activity at all.
>
> The client doesn?t normally log to the journal. Run your client with
> ?ssh -vvv? for debug logging from the client . However Theo has already
> interpreted the diagnostic; you?re probably not going to get much more
> out of it than that.
>
> Server logging seems to be quite thin by default. You could try
> increasing the LogLevel in /etc/ssh/sshd_config (see ?man sshd_config?
> for possible values). You?ll need to restart the server for this to take
> effect (systemctl restart ssh).
>
> However, empirically, it doesn?t seem to have much to say when a
> connection is terminated abnormally, so don?t get your hopes up.
>
> I think Theo is probably right about what?s going on here.
>
>> Is there a list of valid unit names somewhere?
>
> systemctl list-units
>
Thank you!

bob prohaska

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor