Skip to content

Commit

Permalink
Develop (#71)
Browse files Browse the repository at this point in the history
* update

* update

* update

* update. go 1.17.2対応

* update. copyright

* update..

* update pkcs11

* update pkcs11

* update security

* update v0.6.4

* update README.md
  • Loading branch information
blacknon authored Jan 8, 2022
1 parent 6bd03e1 commit 3217d77
Show file tree
Hide file tree
Showing 248 changed files with 8,851 additions and 7,005 deletions.
172 changes: 84 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,49 +74,48 @@ run command.

option(lssh)

NAME:
lssh - TUI list select and parallel ssh client command.
USAGE:
lssh [options] [commands...]

OPTIONS:
--host servername, -H servername connect servername.
--file filepath, -F filepath config filepath. (default: "~/.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.
-D port Dynamic port forward mode(Socks5). 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}).
--term, -t run specified command at terminal.
--parallel, -p run command parallel node(tail -F etc...).
--localrc use local bashrc shell.
--not-localrc not use local bashrc shell.
--pshell, -s use parallel-shell(pshell) (alpha).
--list, -l print server list from config.
--help, -h print this help
--version, -v print the version

COPYRIGHT:
blacknon(blacknon@orebibou.com)

VERSION:
0.6.2

USAGE:
# connect ssh
lssh

# run command selected server over ssh.
lssh command...

# run command parallel in selected server over ssh.
lssh -p command...

# run command parallel in selected server over ssh, do it in interactively shell.
lssh -s

NAME:
lssh - TUI list select and parallel ssh client command.
USAGE:
lssh [options] [commands...]

OPTIONS:
--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.
-D port Dynamic port forward mode(Socks5). 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}).
--term, -t run specified command at terminal.
--parallel, -p run command parallel node(tail -F etc...).
--localrc use local bashrc shell.
--not-localrc not use local bashrc shell.
--pshell, -s use parallel-shell(pshell) (alpha).
--list, -l print server list from config.
--help, -h print this help
--version, -v print the version

COPYRIGHT:
blacknon(blacknon@orebibou.com)

VERSION:
0.6.4

USAGE:
# connect ssh
lssh

# run command selected server over ssh.
lssh command...

# run command parallel in selected server over ssh.
lssh -p command...

# run command parallel in selected server over ssh, do it in interactively shell.
lssh -s


### lscp
Expand All @@ -127,35 +126,34 @@ run command.

option(lscp)

NAME:
lscp - TUI list select and parallel scp client command.
USAGE:
lscp [options] (local|remote):from_path... (local|remote):to_path

OPTIONS:
--host value, -H value connect servernames
--list, -l print server list from config
--file value, -F value config file path (default: "~/.lssh.conf")
--permission, -p copy file permission
--help, -h print this help
--version, -v print the version
NAME:
lscp - TUI list select and parallel scp client command.
USAGE:
lscp [options] (local|remote):from_path... (local|remote):to_path

COPYRIGHT:
blacknon(blacknon@orebibou.com)
OPTIONS:
--host value, -H value connect servernames
--list, -l print server list from config
--file value, -F value config file path (default: "/Users/uesugi/.lssh.conf")
--permission, -p copy file permission
--help, -h print this help
--version, -v print the version

VERSION:
0.6.2
COPYRIGHT:
blacknon(blacknon@orebibou.com)

USAGE:
# local to remote scp
lscp /path/to/local... remote:/path/to/remote
VERSION:
0.6.4

# remote to local scp
lscp remote:/path/to/remote... /path/to/local
USAGE:
# local to remote scp
lscp /path/to/local... remote:/path/to/remote

# remote to remote scp
lscp remote:/path/to/remote... remote:/path/to/local
# remote to local scp
lscp remote:/path/to/remote... /path/to/local

# remote to remote scp
lscp remote:/path/to/remote... remote:/path/to/local


### lsftp
Expand All @@ -166,27 +164,25 @@ run command.

option(lsftp)

NAME:
lsftp - TUI list select and parallel sftp client command.
USAGE:
lsftp [options]

OPTIONS:
--file value, -F value config file path (default: "~/.lssh.conf")
--help, -h print this help
--version, -v print the version

COPYRIGHT:
blacknon(blacknon@orebibou.com)
NAME:
lsftp - TUI list select and parallel sftp client command.
USAGE:
lsftp [options]

VERSION:
0.6.2
OPTIONS:
--file value, -F value config file path (default: "/Users/uesugi/.lssh.conf")
--help, -h print this help
--version, -v print the version

USAGE:
# start lsftp shell
lsftp
COPYRIGHT:
blacknon(blacknon@orebibou.com)

VERSION:
0.6.4

USAGE:
# 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>.
Expand Down Expand Up @@ -377,7 +373,7 @@ You can select multiple connection destinations.
</details>


### 5. include ~/.ssh/config file.
### 6. include ~/.ssh/config file.
<details>

Load and use `~/.ssh/config` by default.\
Expand All @@ -392,7 +388,7 @@ Alternatively, you can specify and read the path as follows: In addition to the

</details>

### 6. include other ServerConfig file.
### 7. include other ServerConfig file.
<details>

You can include server settings in another file.\
Expand Down Expand Up @@ -434,7 +430,7 @@ The priority of setting values ​​is as follows.

</details>

### 7. Supported Proxy
### 8. Supported Proxy
<details>

Supports multiple proxy.
Expand Down Expand Up @@ -505,7 +501,7 @@ Besides this, you can also specify ProxyCommand like OpenSSH.
</details>


### 8. Available authentication method
### 9. Available authentication method
<details>

* Password auth
Expand Down Expand Up @@ -587,7 +583,7 @@ Besides this, you can also specify ProxyCommand like OpenSSH.
</details>


### 9. Port forwarding
### 10. Port forwarding
<details>

Supported Local/Remote/Dynamic port forwarding.\
Expand Down
4 changes: 2 additions & 2 deletions cmd/lscp/args.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down Expand Up @@ -60,7 +60,7 @@ USAGE:
app.Name = "lscp"
app.Usage = "TUI list select and parallel scp client command."
app.Copyright = "blacknon(blacknon@orebibou.com)"
app.Version = "0.6.2"
app.Version = "0.6.4"

// options
// TODO(blacknon): オプションの追加(0.7.0)
Expand Down
2 changes: 1 addition & 1 deletion cmd/lscp/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
4 changes: 2 additions & 2 deletions cmd/lsftp/args.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down Expand Up @@ -51,7 +51,7 @@ USAGE:
app.Name = "lsftp"
app.Usage = "TUI list select and parallel sftp client command."
app.Copyright = "blacknon(blacknon@orebibou.com)"
app.Version = "0.6.2"
app.Version = "0.6.4"

app.Flags = []cli.Flag{
cli.StringFlag{Name: "file,F", Value: defConf, Usage: "config file path"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/lsftp/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
4 changes: 2 additions & 2 deletions cmd/lssh/args.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down Expand Up @@ -65,7 +65,7 @@ USAGE:
app.Name = "lssh"
app.Usage = "TUI list select and parallel ssh client command."
app.Copyright = "blacknon(blacknon@orebibou.com)"
app.Version = "0.6.2"
app.Version = "0.6.4"

// TODO(blacknon): オプションの追加
// -f ... バックグラウンドでの接続(X11接続やport forwardingをバックグラウンドで実行する場合など)。
Expand Down
2 changes: 1 addition & 1 deletion cmd/lssh/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
2 changes: 1 addition & 1 deletion common/common_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
5 changes: 4 additions & 1 deletion conf/conf.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down Expand Up @@ -44,6 +44,9 @@ type LogConfig struct {

// Specifies the directory for creating terminal logs.
Dir string `toml:"dirpath"`

// Logging with remove ANSI code.
RemoveAnsiCode bool `toml:"remove_ansi_code"`
}

// ShellConfig Structure for storing lssh-shell settings.
Expand Down
2 changes: 1 addition & 1 deletion conf/conf_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
2 changes: 1 addition & 1 deletion conf/openssh_conf.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Blacknon. All rights reserved.
// Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.

Expand Down
20 changes: 7 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/blacknon/lssh

require (
github.com/BurntSushi/toml v0.3.1
github.com/blacknon/go-sshlib v0.1.4
github.com/blacknon/go-sshlib v0.1.5
github.com/blacknon/textcol v0.0.1
github.com/c-bata/go-prompt v0.2.5
github.com/dustin/go-humanize v1.0.0
Expand All @@ -14,8 +14,8 @@ require (
github.com/stretchr/testify v1.5.1
github.com/urfave/cli v1.21.0
github.com/vbauerster/mpb v3.4.0+incompatible
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3
golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d
mvdan.cc/sh v2.6.3+incompatible
)

Expand All @@ -34,21 +34,15 @@ require (
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-tty v0.0.3 // indirect
github.com/miekg/pkcs11 v1.0.3 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/thales-e-security/pool v0.0.2 // indirect
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
)

replace github.com/urfave/cli v1.22.0 => ../../urfave/cli

// replace github.com/blacknon/go-sshlib v1.22.0 => ../go-sshlib

replace github.com/miekg/pkcs11 => github.com/blacknon/pkcs11 v1.0.4-0.20201018135904-6038e308f617

go 1.17
Loading

0 comments on commit 3217d77

Please sign in to comment.