mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
_ _ _ _ _
|
||||
| | | | /\ (_) | | | |
|
||||
| |__| | ___ _ __ ___ ___ / \ ___ ___ _ ___| |_ __ _ _ __ | |_
|
||||
| __ |/ _ \| '_ ` _ \ / _ \ / /\ \ / __/ __| / __| __/ _` | '_ \| __|
|
||||
| | | | (_) | | | | | | __/ / ____ \\__ \__ \ \__ \ || (_| | | | | |_
|
||||
|_| |_|\___/|_| |_| |_|\___| /_/ \_\___/___/_|___/\__\__,_|_| |_|\__|
|
||||
|
||||
|
||||
_ _ _
|
||||
| | | | (_)
|
||||
| |__| | __ _ ___ ___ _ ___
|
||||
| __ |/ _` / __/ __| | |/ _ \
|
||||
| | | | (_| \__ \__ \_| | (_) |
|
||||
|_| |_|\__,_|___/___(_)_|\___/
|
||||
|
||||
|
||||
|
||||
Our Cli:
|
||||
Our command line:
|
||||
$ hassio help
|
||||
|
||||
|
||||
@@ -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
BIN
ssh/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
Reference in New Issue
Block a user