Sign inSign up

deepaksorthiya/custom-awslinux-ssh-server-2023

By deepaksorthiya

•Updated about 1 year ago

custom ssh server enable aws linux image

Image
Networking
0

2.3K

deepaksorthiya/custom-awslinux-ssh-server-2023 repository overview

⁠build image

docker build -t deepaksorthiya/custom-awslinux-ssh-server-2023:latest . ## cache docker build --no-cache -t deepaksorthiya/custom-awslinux-ssh-server-2023:latest . ## no cache

⁠run image

docker run --name custom-awslinux-ssh-server-2023 -it -p 22:22 deepaksorthiya/custom-awslinux-ssh-server-2023:latest

⁠Install all packages from the readme

dnf install sudo -y

⁠install minimum utils

sudo dnf install unzip -y && sudo dnf install tar -y && sudo dnf install findutils.x86_64 -y && sudo yum install which -y && sudo yum install iproute -y

⁠start ssh server using(optional)

/usr/sbin/sshd -D

⁠check ssh running port

sudo ss -tulpn | grep LISTEN

⁠import key from host

copy your host ssh public key from ~/.ssh/id_rsa.pub

⁠on remote ssh server add this public key

cd ~/.ssh touch authorized_keys add content of id_rsa.pub to authorized_keys

echo "your pub key" >> authorized_keys

⁠start ssh tunnel from host

ssh -v [email protected]

⁠if error :: REMOTE HOST IDENTIFICATION HAS CHANGED try below first

ssh-keygen -R 127.0.0.1

Tag summary

Content type

Image

Digest

sha256:e708c6962…

Size

156.1 MB

Last updated

about 1 year ago

docker pull deepaksorthiya/custom-awslinux-ssh-server-2023