Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple way to manage your remote machines and SSH keys

License

NotificationsYou must be signed in to change notification settings

d3witt/viking

Repository files navigation

Go Report CardGo ReferenceGitHub release

Simple way to manage your remote machines

Bare metal servers are awesome. They let you pick where to run your software and how to deploy it. You get full control to make the most of the server's resources. No limits, no compromises. That's real freedom.

Viking makes it easier to work with them.

NAME:   viking - Manage your SSH keys and remote machinesUSAGE:   viking [global options] command [command options]VERSION:   v1.0COMMANDS:    exec      Execute shell command on machine    copy, cp  Copy files/folders between local and remote machine    key       Manage SSH keys    machine   Manage your machines    config    Get config directory path    help, h   Shows a list of commands or help for one commandGLOBAL OPTIONS:   --help, -h     show help   --version, -v  print the version

🚀 Installation

Seereleases for pre-built binaries.

On Unix:

env CGO_ENABLED=0 go install -ldflags="-s -w" github.com/d3witt/viking@latest

On Windows cmd:

set CGO_ENABLED=0go install -ldflags="-s -w" github.com/d3witt/viking@latest

On Windows powershell:

$env:CGO_ENABLED = '0'go install -ldflags="-s -w" github.com/d3witt/viking@latest

📄 Usage

🛰️ Add machine:

$ viking machine add --name deathstar --key starkey 168.112.216.50 root@61.22.128.69:3000 73.30.62.32:3001Machine deathstar added.

Note

The key flag is not required. If a key is not specified, SSH Agent will be used to connect to the server.

📡 Exec command (in parallel on all machines):

$ viking exec deathstar echo 1234168.112.216.50: 123461.22.128.69: 123473.30.62.32: 1234

📺 Connect to the machine:

$ viking exec --tty deathstar /bin/bashroot@deathstar:~$

🗂️ Copy files/directories (in parallel to/from all machines):

$ viking cp /tmp/file.txt deathstar:/tmp/Success: 3, Errors: 0

🔑 Add SSH key from a file

$ viking key add --name starkey --passphrase dart ./id_rsa_starKey starkey added.

🆕 Generate SSH Key

$ viking key generate --name starkey2Key starkey2 added.

📋 Copy public SSH Key

$ viking key copy starkey2Public key copied to your clipboard.

⚙️ Custom config directory

Viking saves data locally. SetVIKING_CONFIG_DIR env variable for a custom directory. Useviking config to check the current config folder.

🤝 Missing a Feature?

Feel free to open a new issue, or contact me.

📘 License

Viking is provided under theMIT License.


[8]ページ先頭

©2009-2025 Movatter.jp