mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
ssh: Fixes crash when using authorized keys (#602)
This commit is contained in:
committed by
Pascal Vizeli
parent
48943b3751
commit
0dfd9e075e
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 5.6
|
||||||
|
|
||||||
|
- Fixes crash when using authorized keys
|
||||||
|
|
||||||
## 5.5
|
## 5.5
|
||||||
|
|
||||||
- Rewrite add-on onto Bashio
|
- Rewrite add-on onto Bashio
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ RUN apk add --no-cache \
|
|||||||
mosquitto-clients \
|
mosquitto-clients \
|
||||||
nano \
|
nano \
|
||||||
openssh \
|
openssh \
|
||||||
|
pwgen \
|
||||||
tmux \
|
tmux \
|
||||||
vim
|
vim
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "SSH server",
|
"name": "SSH server",
|
||||||
"version": "5.5",
|
"version": "5.6",
|
||||||
"slug": "ssh",
|
"slug": "ssh",
|
||||||
"description": "Allows connections over SSH",
|
"description": "Allows connections over SSH",
|
||||||
"url": "https://github.com/home-assistant/hassio-addons/tree/master/ssh",
|
"url": "https://github.com/home-assistant/hassio-addons/tree/master/ssh",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if bashio::config.has_value 'authorized_keys'; then
|
|||||||
sed -i s/#PasswordAuthentication.*/PasswordAuthentication\ no/ /etc/ssh/sshd_config
|
sed -i s/#PasswordAuthentication.*/PasswordAuthentication\ no/ /etc/ssh/sshd_config
|
||||||
|
|
||||||
# Unlock account
|
# Unlock account
|
||||||
PASSWORD="$(strings /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c32)"
|
PASSWORD="$(pwgen -s 64 1)"
|
||||||
echo "root:${PASSWORD}" | chpasswd 2&> /dev/null
|
echo "root:${PASSWORD}" | chpasswd 2&> /dev/null
|
||||||
elif bashio::config.has_value 'password'; then
|
elif bashio::config.has_value 'password'; then
|
||||||
bashio::log.info "Setup password login"
|
bashio::log.info "Setup password login"
|
||||||
|
|||||||
Reference in New Issue
Block a user