Documentation: How to use ssh connection
See original GitHub issueHi,
thank you very much for starting this nice package.
Could you please provide one example that shows how to execute the commands on a remote host? I’ve tried to set host=‘ssh://user@ip’, unfortunately without success (the host runs docker and is accessible, validated via docker-py). Connecting to the local machine seems to work.
client = DockerClient(
config=client_config,
context=None,
debug=None,
host='ssh://user@ip',
log_level=None,
tls=None,
tlscacert=None,
tlscert=None,
tlskey=None,
tlsverify=None,
client_config=None,
compose_files=[],
)
client.info()
ValidationError: 53 validation errors for SystemInfo
ID
field required (type=value_error.missing)
Containers
field required (type=value_error.missing)
ContainersRunning
field required (type=value_error.missing)
ContainersPaused
field required (type=value_error.missing)
ContainersStopped
field required (type=value_error.missing)
Images
field required (type=value_error.missing)
Driver
field required (type=value_error.missing)
DriverStatus
field required (type=value_error.missing)
DockerRootDir
field required (type=value_error.missing)
Plugins
field required (type=value_error.missing)
MemoryLimit
field required (type=value_error.missing)
SwapLimit
field required (type=value_error.missing)
KernelMemory
field required (type=value_error.missing)
CpuCfsPeriod
field required (type=value_error.missing)
CpuCfsQuota
field required (type=value_error.missing)
CPUShares
field required (type=value_error.missing)
CPUSet
field required (type=value_error.missing)
PidsLimit
field required (type=value_error.missing)
OomKillDisable
field required (type=value_error.missing)
IPv4Forwarding
field required (type=value_error.missing)
BridgeNfIptables
field required (type=value_error.missing)
BridgeNfIp6tables
field required (type=value_error.missing)
Debug
field required (type=value_error.missing)
NFd
field required (type=value_error.missing)
NGoroutines
field required (type=value_error.missing)
SystemTime
field required (type=value_error.missing)
LoggingDriver
field required (type=value_error.missing)
CgroupDriver
field required (type=value_error.missing)
NEventsListener
field required (type=value_error.missing)
KernelVersion
field required (type=value_error.missing)
OperatingSystem
field required (type=value_error.missing)
OSType
field required (type=value_error.missing)
Architecture
field required (type=value_error.missing)
NCPU
field required (type=value_error.missing)
MemTotal
field required (type=value_error.missing)
IndexServerAddress
field required (type=value_error.missing)
RegistryConfig
field required (type=value_error.missing)
HttpProxy
field required (type=value_error.missing)
HttpsProxy
field required (type=value_error.missing)
NoProxy
field required (type=value_error.missing)
Name
field required (type=value_error.missing)
Labels
field required (type=value_error.missing)
ExperimentalBuild
field required (type=value_error.missing)
ServerVersion
field required (type=value_error.missing)
Runtimes
field required (type=value_error.missing)
DefaultRuntime
field required (type=value_error.missing)
Swarm
field required (type=value_error.missing)
LiveRestoreEnabled
field required (type=value_error.missing)
Isolation
field required (type=value_error.missing)
InitBinary
field required (type=value_error.missing)
ContainerdCommit
field required (type=value_error.missing)
RuncCommit
field required (type=value_error.missing)
InitCommit
field required (type=value_error.missing)
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
The Developer's Guide to Start Using SSH (Connect to Your ...
Using SSH to access your WordPress site will make you a more efficient developer. Learn how to do it with this in-depth guide....
Read more >SSH Essentials: Working with SSH Servers, Clients, and Keys
SSH, or secure shell, is the most common way of connecting to and administering remote Linux servers. In this cheat sheet-style guide, ...
Read more >ssh command usage, options, and configuration in Linux/Unix.
This command is used to start the SSH client program that enables secure connection to the SSH server on a remote machine. The...
Read more >Connecting to GitHub with SSH
You can connect to GitHub using the Secure Shell Protocol (SSH), which provides a secure channel over an unsecured network.
Read more >SSH Access - cPanel & WHM Documentation
This interface provides information about how to connect to another web server via the SSH (secure shell) network protocol.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works, however only if I run ssh-add in the same shell before executing the docker command:
Without ssh-add, I get
I get this error.
error during connect: Get http://docker/v1.24/containers/json: command [ssh -l root -- xxx.xx.xx.xx docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=Permission denied, please try again.
I solved the error by running ssh-copy-id in my local pc root and setting the password authentication to yes. Now,when I run the command you sent it just keeps running.i have tried everything, i believe there’s something wrong with the command. what exactly is the command supposed to do? because i am running it inside a vps. i do not have docker installed locally. This isn’t much of a problem, because remote connection actually works now. i raised another issue.