-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from blacknon/develop
Version 0.6.8
- Loading branch information
Showing
556 changed files
with
43,747 additions
and
13,998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[![TravisCI](https://travis-ci.org/blacknon/lssh.svg?branch=master)](https://travis-ci.org/blacknon/lssh) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/blacknon/lssh)](https://goreportcard.com/report/github.com/blacknon/lssh) | ||
|
||
lssh | ||
|
@@ -20,14 +19,13 @@ Supported multiple ssh proxy, http/socks5 proxy, x11 forward, and port forwardin | |
|
||
## Features | ||
|
||
* List selection type ssh client. | ||
* List selection type Pure Go ssh client. | ||
* It can run on **Linux**, **macOS** and **Windows**. | ||
* Pure Go. | ||
* Commands can be executed by ssh connection in **parallel**. | ||
* There is a shell function that connects to multiple hosts in parallel for interactive operation and connects with local commands via pipes. | ||
* Supported multiple proxy, **ssh**, **http**, and **socks5** proxy. It's supported multi-stage proxy. | ||
* Supported **ssh-agent**. | ||
* Supported **Local** and **Remote Port forward**, **Dynamic Forward**, **Reverse Dynamic Forward** and **x11 forward**. | ||
* Supported **Local** and **Remote Port forward**, **Dynamic Forward(SOCKS5, http)**, **Reverse Dynamic Forward(SOCKS5)** and **x11 forward**. | ||
* Can use bashrc of local machine at ssh connection destination. | ||
* It supports various authentication methods. Password, Public key, Certificate and PKCS11(Yubikey etc.). | ||
* Can read the OpenSSH config (~/.ssh/config) and use it as it is. | ||
|
@@ -109,12 +107,14 @@ option(lssh) | |
--host servername, -H servername connect servername. | ||
--file filepath, -F filepath config filepath. (default: "/Users/uesugi/.lssh.conf") | ||
-L [bind_address:]port:remote_address:port Local port forward mode.Specify a [bind_address:]port:remote_address:port. Only single connection works. | ||
-R [bind_address:]port:remote_address:port Remote port forward mode.Specify a [bind_address:]port:remote_address:port. Only single connection works. | ||
-R [bind_address:]port:remote_address:port Remote port forward mode.Specify a [bind_address:]port:remote_address:port. If only one port is specified, it will operate as Reverse Dynamic Forward. Only single connection works. | ||
-D port Dynamic port forward mode(Socks5). Specify a port. Only single connection works. | ||
-d port HTTP Dynamic port forward mode. Specify a port. Only single connection works. | ||
-w Displays the server header when in command execution mode. | ||
-W Not displays the server header when in command execution mode. | ||
--not-execute, -N not execute remote command and shell. | ||
--x11, -X x11 forwarding(forward to ${DISPLAY}). | ||
--X11, -X Enable x11 forwarding(forward to ${DISPLAY}). | ||
-Y Enable trusted x11 forwarding(forward to ${DISPLAY}). | ||
--term, -t run specified command at terminal. | ||
--parallel, -p run command parallel node(tail -F etc...). | ||
--localrc use local bashrc shell. | ||
|
@@ -128,7 +128,7 @@ option(lssh) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.7 | ||
0.6.8 | ||
|
||
USAGE: | ||
# connect ssh | ||
|
@@ -144,6 +144,7 @@ option(lssh) | |
lssh -s | ||
|
||
|
||
|
||
### lscp | ||
|
||
run command. | ||
|
@@ -169,7 +170,7 @@ option(lscp) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.7 | ||
0.6.8 | ||
|
||
USAGE: | ||
# local to remote scp | ||
|
@@ -204,11 +205,12 @@ option(lsftp) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.7 | ||
0.6.8 | ||
|
||
USAGE: | ||
# start lsftp shell | ||
lsftp | ||
# start lsftp shell | ||
lsftp | ||
|
||
|
||
|
||
If you specify a command as an argument, you can select multiple hosts. Select host <kbd>Tab</kbd>, select all displayed hosts <kbd>Ctrl</kbd> + <kbd>a</kbd>. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ package main | |
import ( | ||
"fmt" | ||
"os" | ||
"os/user" | ||
"sort" | ||
"strings" | ||
|
||
|
@@ -21,8 +20,7 @@ import ( | |
|
||
func Lscp() (app *cli.App) { | ||
// Default config file path | ||
usr, _ := user.Current() | ||
defConf := usr.HomeDir + "/.lssh.conf" | ||
defConf := common.GetDefaultConfigPath() | ||
|
||
// Set help templete | ||
cli.AppHelpTemplate = `NAME: | ||
|
@@ -60,7 +58,7 @@ USAGE: | |
app.Name = "lscp" | ||
app.Usage = "TUI list select and parallel scp client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.7" | ||
app.Version = "0.6.8" | ||
|
||
// options | ||
// TODO(blacknon): オプションの追加(0.7.0) | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ package main | |
import ( | ||
"fmt" | ||
"os" | ||
"os/user" | ||
"sort" | ||
|
||
"github.com/blacknon/lssh/common" | ||
"github.com/blacknon/lssh/conf" | ||
"github.com/blacknon/lssh/list" | ||
"github.com/blacknon/lssh/sftp" | ||
|
@@ -18,8 +18,7 @@ import ( | |
|
||
func Lsftp() (app *cli.App) { | ||
// Default config file path | ||
usr, _ := user.Current() | ||
defConf := usr.HomeDir + "/.lssh.conf" | ||
defConf := common.GetDefaultConfigPath() | ||
|
||
// Set help templete | ||
cli.AppHelpTemplate = `NAME: | ||
|
@@ -42,16 +41,16 @@ VERSION: | |
{{.Version}} | ||
{{end}} | ||
USAGE: | ||
# start lsftp shell | ||
{{.Name}} | ||
# start lsftp shell | ||
{{.Name}} | ||
` | ||
// Create app | ||
app = cli.NewApp() | ||
// app.UseShortOptionHandling = true | ||
app.Name = "lsftp" | ||
app.Usage = "TUI list select and parallel sftp client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.7" | ||
app.Version = "0.6.8" | ||
|
||
app.Flags = []cli.Flag{ | ||
cli.StringFlag{Name: "file,F", Value: defConf, Usage: "config file path"}, | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,11 @@ | |
// Use of this source code is governed by an MIT license | ||
// that can be found in the LICENSE file. | ||
|
||
// TODO: dynamic port forwarding風に http proxyを生やすオプションの追加 | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"os/user" | ||
"regexp" | ||
"sort" | ||
|
||
|
@@ -23,8 +20,7 @@ import ( | |
|
||
func Lssh() (app *cli.App) { | ||
// Default config file path | ||
usr, _ := user.Current() | ||
defConf := usr.HomeDir + "/.lssh.conf" | ||
defConf := common.GetDefaultConfigPath() | ||
|
||
// Set help templete | ||
cli.AppHelpTemplate = `NAME: | ||
|
@@ -66,7 +62,7 @@ USAGE: | |
app.Name = "lssh" | ||
app.Usage = "TUI list select and parallel ssh client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.7" | ||
app.Version = "0.6.8" | ||
|
||
// TODO(blacknon): オプションの追加 | ||
// -f ... バックグラウンドでの接続(X11接続やport forwardingをバックグラウンドで実行する場合など)。 | ||
|
@@ -86,14 +82,17 @@ USAGE: | |
|
||
// port forward option | ||
cli.StringSliceFlag{Name: "L", Usage: "Local port forward mode.Specify a `[bind_address:]port:remote_address:port`. Only single connection works."}, | ||
cli.StringSliceFlag{Name: "R", Usage: "Remote port forward mode.Specify a `[bind_address:]port:remote_address:port`. Only single connection works."}, | ||
cli.StringSliceFlag{Name: "R", Usage: "Remote port forward mode.Specify a `[bind_address:]port:remote_address:port`. If only one port is specified, it will operate as Reverse Dynamic Forward. Only single connection works."}, | ||
cli.StringFlag{Name: "D", Usage: "Dynamic port forward mode(Socks5). Specify a `port`. Only single connection works."}, | ||
cli.StringFlag{Name: "d", Usage: "HTTP Dynamic port forward mode. Specify a `port`. Only single connection works."}, | ||
// cli.StringFlag{Name: "r", Usage: "HTTP Reverse Dynamic port forward mode. Specify a `port`. Only single connection works."}, | ||
|
||
// Other bool | ||
cli.BoolFlag{Name: "w", Usage: "Displays the server header when in command execution mode."}, | ||
cli.BoolFlag{Name: "W", Usage: "Not displays the server header when in command execution mode."}, | ||
cli.BoolFlag{Name: "not-execute,N", Usage: "not execute remote command and shell."}, | ||
cli.BoolFlag{Name: "x11,X", Usage: "x11 forwarding(forward to ${DISPLAY})."}, | ||
cli.BoolFlag{Name: "X11,X", Usage: "Enable x11 forwarding(forward to ${DISPLAY})."}, | ||
cli.BoolFlag{Name: "Y", Usage: "Enable trusted x11 forwarding(forward to ${DISPLAY})."}, | ||
cli.BoolFlag{Name: "term,t", Usage: "run specified command at terminal."}, | ||
cli.BoolFlag{Name: "parallel,p", Usage: "run command parallel node(tail -F etc...)."}, | ||
cli.BoolFlag{Name: "localrc", Usage: "use local bashrc shell."}, | ||
|
@@ -180,7 +179,15 @@ USAGE: | |
r.IsParallel = c.Bool("parallel") | ||
|
||
// x11 forwarding | ||
r.X11 = c.Bool("x11") | ||
enableX11 := c.Bool("X11") | ||
enableTrustedX11 := c.Bool("Y") | ||
|
||
if enableX11 || enableTrustedX11 { | ||
r.X11 = true | ||
} | ||
if enableTrustedX11 { | ||
r.X11Trusted = true | ||
} | ||
|
||
// is tty | ||
r.IsTerm = c.Bool("term") | ||
|
@@ -239,6 +246,9 @@ USAGE: | |
// Dynamic port forwarding port | ||
r.DynamicPortForward = c.String("D") | ||
|
||
// HTTP Dynamic port forwarding port | ||
r.HTTPDynamicPortForward = c.String("d") | ||
|
||
r.Start() | ||
return nil | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.