Ssh update (#1039)

* Change motd & fix .ssh

* Update config.json

* Fix root folder

* Update CHANGELOG.md

* Update run.sh

* ssh: Fix new tmux windows, add add-on icon (#1038)

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Pascal Vizeli
2020-02-03 13:53:58 +01:00
committed by GitHub
parent 583267687d
commit 6b20f0c293
6 changed files with 22 additions and 16 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 8.2
- Fix creation of new tmux terminal windows
- Add add-on icon
- Update welcome logo
- Fix SSH folder issue with authorized keys
## 8.1
- Fix for non existing .bash_profile startup error

View File

@@ -1,6 +1,6 @@
{
"name": "SSH server",
"version": "8.1",
"version": "8.2",
"slug": "ssh",
"description": "Allows connections over SSH",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/ssh",

View File

@@ -1,4 +1,3 @@
set-option -g default-shell /bin/zsh
set-option -g default-terminal $TERM
set-option -g base-index 1
setw -g pane-base-index 1

View File

@@ -1,13 +1,11 @@
_ _ _ _ _
| | | | /\ (_) | | | |
| |__| | ___ _ __ ___ ___ / \ ___ ___ _ ___| |_ __ _ _ __ | |_
| __ |/ _ \| '_ ` _ \ / _ \ / /\ \ / __/ __| / __| __/ _` | '_ \| __|
| | | | (_) | | | | | | __/ / ____ \\__ \__ \ \__ \ || (_| | | | | |_
|_| |_|\___/|_| |_| |_|\___| /_/ \_\___/___/_|___/\__\__,_|_| |_|\__|
_ _ _
| | | | (_)
| |__| | __ _ ___ ___ _ ___
| __ |/ _` / __/ __| | |/ _ \
| | | | (_| \__ \__ \_| | (_) |
|_| |_|\__,_|___/___(_)_|\___/
Our Cli:
Our command line:
$ hassio help

View File

@@ -9,12 +9,14 @@ bashio::log.info "Initializing add-on for use..."
if bashio::config.has_value 'authorized_keys'; then
bashio::log.info "Setup authorized_keys"
mkdir -p ~/.ssh
mkdir -p /data/.ssh
chmod 700 /data/.ssh
rm -f /data/.ssh/authorized_keys
while read -r line; do
echo "$line" >> ~/.ssh/authorized_keys
echo "$line" >> /data/.ssh/authorized_keys
done <<< "$(bashio::config 'authorized_keys')"
chmod 600 ~/.ssh/authorized_keys
chmod 600 /data/.ssh/authorized_keys
sed -i s/#PasswordAuthentication.*/PasswordAuthentication\ no/ /etc/ssh/sshd_config
# Unlock account
@@ -103,4 +105,4 @@ WAIT_PIDS+=($!)
# Wait until all is done
bashio::log.info "SSH add-on is set up and running!"
wait "${WAIT_PIDS[@]}"
wait "${WAIT_PIDS[@]}"

BIN
ssh/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB