Skip to content

oKatanaaa/OpenSSH-Docker-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenSSH Docker Server

This repository contains an example of a simple OpenSSH Docker Server. I made it as a shortcut to suit my working needs, but I bet it will be helpful for others as well.

Building and running

On your remote server do the following:

  1. Run git clone https://github.com/oKatanaaa/OpenSSH-Docker-Server.git
  2. Run cd OpenSSH-Docker-Server
  3. Set the password in Dockerfile (line 15). In this example a pytorch docker is being set, but you can customize the image to suit your needs (pick a different base image, install other packages, etc).
  4. Run bash build.sh
  5. Set the port and your working directory in run.sh (line 4 and 5).
  6. Run bash run.sh

Connecting

The server is up. In Visual Studio Code open SSH configuration file (Remote-SSH: Open SSH Configuration File). Add the following (fill in where needed):

Host your_host_name
    HostName your_server_ip
    Port your_port
    User root

your_host_name can be arbitrary.

Once configuration is set, you can connect. Run Remote-SSH: Connect to Host in VS Code command palette and choose your_host_name. VS Code will connect and set up VS Code Server. You are good to go.

About

A simple OpenSSH docker server example.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published