go-ssh-examples

Go examples of SSH servers and clients

  • Owner: Scalingo/go-ssh-examples
  • Platform:
  • License:: BSD 2-Clause "Simplified" License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Main metrics

Overview
Name With OwnerScalingo/go-ssh-examples
Primary LanguageGo
Program languageGo (Language Count: 2)
Platform
License:BSD 2-Clause "Simplified" License
所有者活动
Created At2014-12-05 14:48:45
Pushed At2023-06-23 08:02:11
Last Commit At2023-06-23 10:02:11
Release Count0
用户参与
Stargazers Count284
Watchers Count12
Fork Count66
Commits Count15
Has Issues Enabled
Issues Count10
Issue Open Count6
Pull Requests Count2
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private