go-ssh-examples

command module
v0.0.0-...-003de29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2023 License: BSD-2-Clause Imports: 14 Imported by: 0

README

/!\ This repository is unmaintained

SSH Client/Server example with Go

Initialization

To setup a SSH server, a host ssh keypair (usually RSA) has to be created, to do so, run:

bash init.sh

Those files should have been created in the project directory:

  • ./host_key
  • ./host_key.pub

Simple client usage

go run client.go <user> <server:port> <command>

Example:

└> go run client.go foobar example.com:22 'ls /'
Password: *********
bin
boot
conf.d
dev
etc
home
initrd.img
lib
lib64
lost+found
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
vmlinuz
Notes:

Please create issues, if you want more details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL