-
-
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 #94 from blacknon/develop
Version 0.6.7 Close #86 Close #91 Close #92 - Supported Windows. - Add Reverse Dynamic Forward. - Add localrc compress option. - Addition of function to specify host in target PATH with shell command of lsftp. - example: `get host1,host2:/path/to/src /path/to/dest`
- Loading branch information
Showing
263 changed files
with
17,063 additions
and
4,537 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,24 +21,42 @@ Supported multiple ssh proxy, http/socks5 proxy, x11 forward, and port forwardin | |
## Features | ||
|
||
* List selection type ssh client. | ||
* It can run on **Linux**, **macOS** and **Windows**. | ||
* Pure Go. | ||
* Commands can be executed by ssh connection in parallel. | ||
* Supported ssh multiple proxy, http/socks5 proxy. | ||
* Supported ssh-agent. | ||
* Supported Port forward, x11 forward. | ||
* 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**. | ||
* 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. | ||
|
||
## Demo | ||
|
||
### run MacOSX | ||
|
||
<p align="center"> | ||
<img src="./images/lssh_macosx.gif" /> | ||
</p> | ||
|
||
### run Linux(Manjaro) | ||
|
||
<p align="center"> | ||
<img src="./images/lssh_linux.gif" /> | ||
</p> | ||
|
||
### run Windows(Windows 10) | ||
|
||
<p align="center"> | ||
<img src="./images/lssh.gif" /> | ||
<img src="./images/lssh_windows.gif" /> | ||
</p> | ||
|
||
## Install | ||
|
||
### compile | ||
|
||
compile gofile(tested go1.15.5). | ||
compile gofile(tested go1.17.6). | ||
|
||
GO111MODULE=auto go get -u github.com/blacknon/lssh/cmd/lssh | ||
GO111MODULE=auto go get -u github.com/blacknon/lssh/cmd/lscp | ||
|
@@ -110,7 +128,7 @@ option(lssh) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.5 | ||
0.6.7 | ||
|
||
USAGE: | ||
# connect ssh | ||
|
@@ -151,7 +169,7 @@ option(lscp) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.5 | ||
0.6.7 | ||
|
||
USAGE: | ||
# local to remote scp | ||
|
@@ -186,7 +204,7 @@ option(lsftp) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.5 | ||
0.6.7 | ||
|
||
USAGE: | ||
# start lsftp shell | ||
|
@@ -219,6 +237,7 @@ You can connect using a local bashrc file (if ssh login shell is bash). | |
key = "/path/to/private_key" | ||
note = "Use local bashrc files." | ||
local_rc = 'yes' | ||
local_rc_compress = true # gzip compress localrc file data | ||
local_rc_file = [ | ||
"~/dotfiles/.bashrc" | ||
,"~/dotfiles/bash_prompt" | ||
|
@@ -602,7 +621,7 @@ You can specify from the command line or from the configuration file. | |
lssh -L 8080:localhost:80 # local port forwarding | ||
lssh -R 80:localhost:8080 # remote port forwarding | ||
lssh -D 10080 # dynamic port forwarding | ||
|
||
lssh -R 10080 # Reverse Dynamic port forwarding | ||
|
||
#### config file | ||
|
||
|
@@ -623,6 +642,22 @@ You can specify from the command line or from the configuration file. | |
port_forward_remote = "localhost:8080" | ||
note = "remote port forwawrd example" | ||
|
||
[server.DynamicForward] | ||
addr = "dynamicforward.local" | ||
user = "user" | ||
agentauth = true | ||
dynamic_port_forward = "11080" | ||
note = "dynamic forwawrd example" | ||
|
||
[server.ReverseDynamicForward] | ||
addr = "reversedynamicforward.local" | ||
user = "user" | ||
agentauth = true | ||
reverse_dynamic_port_forward = "11080" | ||
note = "reverse dynamic forwawrd example" | ||
|
||
|
||
|
||
If OpenSsh config is loaded, it will be loaded as it is. | ||
|
||
|
||
|
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (c) 2021 Blacknon. All rights reserved. | ||
// Copyright (c) 2022 Blacknon. All rights reserved. | ||
// Use of this source code is governed by an MIT license | ||
// that can be found in the LICENSE file. | ||
|
||
|
@@ -60,7 +60,7 @@ USAGE: | |
app.Name = "lscp" | ||
app.Usage = "TUI list select and parallel scp client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.6" | ||
app.Version = "0.6.7" | ||
|
||
// options | ||
// TODO(blacknon): オプションの追加(0.7.0) | ||
|
@@ -114,7 +114,7 @@ USAGE: | |
check.CheckTypeError(isFromInRemote, isFromInLocal, isToRemote, len(hosts)) | ||
|
||
// Get config data | ||
data := conf.ReadConf(confpath) | ||
data := conf.Read(confpath) | ||
|
||
// Get Server Name List (and sort List) | ||
names := conf.GetNameList(data) | ||
|
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,4 @@ | ||
// Copyright (c) 2021 Blacknon. All rights reserved. | ||
// Copyright (c) 2022 Blacknon. All rights reserved. | ||
// Use of this source code is governed by an MIT license | ||
// that can be found in the LICENSE file. | ||
|
||
|
@@ -51,7 +51,7 @@ USAGE: | |
app.Name = "lsftp" | ||
app.Usage = "TUI list select and parallel sftp client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.6" | ||
app.Version = "0.6.7" | ||
|
||
app.Flags = []cli.Flag{ | ||
cli.StringFlag{Name: "file,F", Value: defConf, Usage: "config file path"}, | ||
|
@@ -72,7 +72,7 @@ USAGE: | |
confpath := c.String("file") | ||
|
||
// Get config data | ||
data := conf.ReadConf(confpath) | ||
data := conf.Read(confpath) | ||
|
||
// Get Server Name List (and sort List) | ||
names := conf.GetNameList(data) | ||
|
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,4 @@ | ||
// Copyright (c) 2021 Blacknon. All rights reserved. | ||
// Copyright (c) 2022 Blacknon. All rights reserved. | ||
// Use of this source code is governed by an MIT license | ||
// that can be found in the LICENSE file. | ||
|
||
|
@@ -10,6 +10,7 @@ import ( | |
"fmt" | ||
"os" | ||
"os/user" | ||
"regexp" | ||
"sort" | ||
|
||
"github.com/blacknon/lssh/check" | ||
|
@@ -65,7 +66,7 @@ USAGE: | |
app.Name = "lssh" | ||
app.Usage = "TUI list select and parallel ssh client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.6" | ||
app.Version = "0.6.7" | ||
|
||
// TODO(blacknon): オプションの追加 | ||
// -f ... バックグラウンドでの接続(X11接続やport forwardingをバックグラウンドで実行する場合など)。 | ||
|
@@ -116,7 +117,7 @@ USAGE: | |
confpath := c.String("file") | ||
|
||
// Get config data | ||
data := conf.ReadConf(confpath) | ||
data := conf.Read(confpath) | ||
|
||
// Set `exec command` or `shell` flag | ||
isMulti := false | ||
|
@@ -214,8 +215,14 @@ USAGE: | |
for _, forwardargs := range c.StringSlice("R") { | ||
f := new(conf.PortForward) | ||
f.Mode = "R" | ||
f.Local, f.Remote, err = common.ParseForwardPort(forwardargs) | ||
forwards = append(forwards, f) | ||
|
||
// If only numbers are passed as arguments, treat as Reverse Dynamic Port Forward | ||
if regexp.MustCompile(`^[0-9]+$`).Match([]byte(forwardargs)) { | ||
r.ReverseDynamicPortForward = forwardargs | ||
} else { | ||
f.Local, f.Remote, err = common.ParseForwardPort(forwardargs) | ||
forwards = append(forwards, f) | ||
} | ||
} | ||
|
||
// if err | ||
|
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.