Skip to content

Error. Device not added! 111 The execution of the pregetinformation.sh script ended with an error #7

@vkotov

Description

@vkotov

Hello.
Please help with issue. I can't add device using current instructions.

  1. Clean image of Raspberry PI OS Lite 64-bit (Release 2023-02-21) is written by Raspberry Pi Imager v1.7.3
  2. Connect via SSH and apply changes to /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
  1. Restart SSH server by sudo systemctl reload ssh
  2. Click Add Device button (VS Code, .NET FastIOT panel) and provide all required data.
  3. Error message shown:
Error. Device not added! 
111 The execution of the pregetinformation.sh script ended with an error

Command sudo systemctl status ssh output:

Mar 01 12:49:55 auto sshd[737]: pam_unix(sshd:session): session opened for user auto(uid=1000) by (uid=0)
Mar 01 12:58:21 auto systemd[1]: Reloading OpenBSD Secure Shell server.
Mar 01 12:58:21 auto sshd[567]: Received SIGHUP; restarting.
Mar 01 12:58:21 auto systemd[1]: Reloaded OpenBSD Secure Shell server.
Mar 01 12:58:21 auto sshd[567]: Server listening on 0.0.0.0 port 22.
Mar 01 12:58:21 auto sshd[567]: Server listening on :: port 22.
Mar 01 12:59:05 auto sshd[1391]: error: kex_exchange_identification: Connection closed by remote host
Mar 01 12:59:05 auto sshd[1391]: Connection closed by 192.168.1.115 port 60751
Mar 01 12:59:05 auto sshd[1392]: Accepted password for auto from 192.168.1.115 port 60752 ssh2
Mar 01 12:59:05 auto sshd[1392]: pam_unix(sshd:session): session opened for user auto(uid=1000) by (uid=0)

Command sudo ./vscode-dotnetfastiot.sh (from user home directory) output:

Run: pregetinformation.sh
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (11.1.0).
lsb-release set to manually installed.
rsync is already the newest version (3.2.3-4+deb11u1).
wget is already the newest version (1.21-1+deb11u1).
wget set to manually installed.
sudo is already the newest version (1.9.5p2-3+deb11u1).
The following additional packages will be installed:
  libcurl4 libjq1 libonig5
The following NEW packages will be installed:
  jq libjq1 libonig5
The following packages will be upgraded:
  curl libcurl4
2 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 951 kB of archives.
After this operation, 1,117 kB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security bullseye-security/main arm64 curl arm64 7.74.0-1.3+deb11u7 [265 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 libonig5 arm64 6.9.6-1.1 [176 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 libjq1 arm64 1.6-2.1 [121 kB]
Get:4 http://security.debian.org/debian-security bullseye-security/main arm64 libcurl4 arm64 7.74.0-1.3+deb11u7 [325 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 jq arm64 1.6-2.1 [64.5 kB]
Fetched 951 kB in 1s (1,352 kB/s)
apt-listchanges: Reading changelogs...
(Reading database ... 38049 files and directories currently installed.)
Preparing to unpack .../curl_7.74.0-1.3+deb11u7_arm64.deb ...
Unpacking curl (7.74.0-1.3+deb11u7) over (7.74.0-1.3+deb11u5) ...
Preparing to unpack .../libcurl4_7.74.0-1.3+deb11u7_arm64.deb ...
Unpacking libcurl4:arm64 (7.74.0-1.3+deb11u7) over (7.74.0-1.3+deb11u5) ...
Selecting previously unselected package libonig5:arm64.
Preparing to unpack .../libonig5_6.9.6-1.1_arm64.deb ...
Unpacking libonig5:arm64 (6.9.6-1.1) ...
Selecting previously unselected package libjq1:arm64.
Preparing to unpack .../libjq1_1.6-2.1_arm64.deb ...
Unpacking libjq1:arm64 (1.6-2.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../archives/jq_1.6-2.1_arm64.deb ...
Unpacking jq (1.6-2.1) ...
Setting up libcurl4:arm64 (7.74.0-1.3+deb11u7) ...
Setting up curl (7.74.0-1.3+deb11u7) ...
Setting up libonig5:arm64 (6.9.6-1.1) ...
Setting up libjq1:arm64 (1.6-2.1) ...
Setting up jq (1.6-2.1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ...
Successfully

Where I am wrong?

I also try additional steps from Troubleshoot adding device

PubkeyAcceptedAlgorithms=+ssh-rsa option not working for me but I try PubkeyAcceptedKeyTypes=+ssh-rsa instead.
Reboot also has no effect.

Now my /etc/ssh/sshd_config:

#       $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

Include /etc/ssh/sshd_config.d/*.conf

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

AuthenticationMethods publickey keyboard-interactive password
PubkeyAcceptedKeyTypes=+ssh-rsa

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile     .ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem       sftp    /usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions