TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ELI THE BEARDED
from: JACK FEARNLEY
date: 2017-12-14 20:07:00
subject: Re: problems with ssh

On Thu, 14 Dec 2017 19:34:07 +0000, Eli the Bearded wrote:

> In comp.sys.raspberry-pi, Jack Fearnley  
> wrote:
>> On Thu, 14 Dec 2017 17:55:13 +0000, Roger Bell_West wrote:
>> >>I enter the password and the terminal freezes.
>> >>Any suggestions?
>> > Look at the sshd logs on the target host. /var/log/auth.log is the
>> > main one, though there may be some useful content in daemon.log too.
>>
>> The following list from /var/log/auth.log shows me starting sshd with
>> 'sudo service start sshd' and attempting to connect with 'ssh
>> pi@192.168.0.104'
>>
>>
*************************************************************************
>> Dec 14 13:14:33 beta sshd[5635]: Accepted password for jack from
>> 192.168.0.104 port 56346 ssh2 Dec 14 13:14:33 beta sshd[5635]:
>> pam_unix(sshd:session): session opened for user jack by (uid=0)
>> Dec 14 13:14:33 beta systemd-logind[768]: New session 8 of user jack.
>> Dec 14 13:17:01 beta CRON[5727]: pam_unix(cron:session): session opened
>> for user root by (uid=0)
>> Dec 14 13:17:01 beta CRON[5727]: pam_unix(cron:session): session closed
>> for user root
>>
************************************************************************
>
> Nothing in there for user pi.
>
> I have two suggestions:
>
>   1) Use ssh with -v or -v -v -v to get an idea of what ssh thinks is
>      going on.
>
>   1b) Start a verbose instance of sshd on a different port, and look at
>       it's verbose logs (can be a little trickier, because you need key
>       files, but you can do this as a non-root user).
>
>   2) The ssh is working, but you have configured something on startup
>      (eg in .login or .profile) that prevents a shell from ever
>      answering. Something like 'startx' in your .login, for example.
>

Here is the, rather long, result of 'ssh -v pi@192.168.0.104'

***************************************************************************

jack@beta:~$ ssh -v pi@192.168.0.104
OpenSSH_7.5p1 Ubuntu-10, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.104 [192.168.0.104] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/jack/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-10
debug1: Remote protocol version 2.0, remote software version
OpenSSH_6.7p1 Raspbian-5+deb8u3
debug1: match: OpenSSH_6.7p1 Raspbian-5+deb8u3 pat OpenSSH* compat
0x04000000
debug1: Authenticating to 192.168.0.104:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC:
 compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:
 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256
SHA256:2THE2JPxFtwHBWnyOfaRD7wcLZF+DPTZB6ymqx4RKxA
debug1: Host '192.168.0.104' is known and matches the ECDSA host key.
debug1: Found key in /home/jack/.ssh/known_hosts:7
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/jack/.ssh/id_rsa
debug1: Trying private key: /home/jack/.ssh/id_dsa
debug1: Trying private key: /home/jack/.ssh/id_ecdsa
debug1: Trying private key: /home/jack/.ssh/id_ed25519
debug1: Next authentication method: password
pi@192.168.0.104's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.0.104 ([192.168.0.104]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_CA.UTF-8
******************************************************************************

Note that seven lines before the end it accepts and authenticates the
password. After the last line it freezes and I have to X the terminal
window.

> Elijah ------
> usually can figure these problems out without resorting to a 1b solution

Jack

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.