Closed andy108369 closed 1 month ago
One can simply add openssh server to their deployment and their public keys to keep a permanent SSH access to the deployment.
Make sure to set your public ssh key in
SSH_PUBKEY
image: ubuntu:22.04
env:
- 'SSH_PUBKEY=ssh-rsa AAAAB3NzaC1yc...'
command:
- sh
- -c
- |
apt-get update
apt-get install -y --no-install-recommends -- tini ssh
mkdir -p -m0755 /run/sshd
mkdir -m700 ~/.ssh
echo "$SSH_PUBKEY" | tee ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
cat /proc/1/environ |xargs -0 -n1 | tee -a /etc/environment
/usr/sbin/sshd
exec /usr/bin/tini -- tail -f /dev/null
expose:
# HTTP/HTTPS port
- port: 80
as: 80
to:
- global: true
# SSH port
- port: 22
as: 22
to:
- global: true
Make sure to set your public ssh key in
SSH_PUBKEY
image: alpine:3.18.4
env:
- 'SSH_PUBKEY=ssh-rsa AAAAB3NzaC1yc...'
command:
- sh
- -c
- |
apk update
apk add tini openssh-server
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
mkdir -m700 ~/.ssh
echo "$SSH_PUBKEY" | tee ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
cat /proc/1/environ |xargs -0 -n1 | tee -a /etc/environment
/usr/sbin/sshd
exec /sbin/tini -- tail -f /dev/null
expose:
# HTTP/HTTPS port
- port: 80
as: 80
to:
- global: true
# SSH port
- port: 22
as: 22
to:
- global: true
And to combine the sshd dameon with running the app(s), one can simply add them one by one:
app1 &
app2 &
exec /usr/sbin/sshd -D
To figure what one has to run (and how) in a specific image:
docker pull <image>
docker image history <image> --no-trunc --format '{{.CreatedBy}}' | grep -E '^WORKDIR|^ENTRYPOINT|^CMD|^USER'
Would be nice with a fix for this... a lot of customers, have a bad experience because of it.
Added this to the "Up Next" list on the product/ eng roadmap https://github.com/orgs/akash-network/projects/5/views/1
Hey team, fixing this issue quickly would really help us out at Spheron. We've got a bunch of users struggling to connect shell for their keys or to check status, and it's becoming a bit of a headache. Could we get this sorted out as soon as possible? We're more than happy to give it a test run even before it goes live on the main provider code. Thanks a bunch for jumping on this quickly!
April 2nd, 2024
Provider 0.6.4
fixed this issue! :rocket:
We'll be rolling the update ASAP.
lease-shell
breaks withremote server returned 404
once provider service gets restarted..manifest.deployments
track breaks as well.This issue appeared in akash
0.16.4
through provider-services0.2.1
.This issue gets resolved if I revert this commit https://github.com/akash-network/node/commit/1ab8ee6ebd1321d98fb899c8661316cf182a4d4d
looks like the
ctx
is not getting updated with the active leases (upon provider restart) forIsActive
to work.This commit might be also related to
manifest.deployments
is reporting0
now (ormainnet4
upgrade-related [provider-services0.1.0
]):Update: 23 Jan 2023
Akash Provider reports: