-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from haccht/auto-login
Auto login
- Loading branch information
Showing
2 changed files
with
71 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
# ssh2telnet | ||
Proxy ssh connection into telnet. | ||
|
||
## Usage | ||
## Options | ||
|
||
``` | ||
$ ssh2telnet -h | ||
Usage: | ||
ssh2telnet [OPTIONS] | ||
Application Options: | ||
-a, --addr= Address to listen on (default: :2222) | ||
-k, --key= Path to the host key | ||
-a, --addr= Address to listen (default: localhost:2222) | ||
-k, --key= Path to the host key | ||
-l, --login Enable auto login | ||
--login-prompt= Login prompt (default: "login: ") | ||
--password-prompt= Password prompt (default: "Password: ") | ||
Help Options: | ||
-h, --help Show this help message | ||
``` | ||
## Basic Usage | ||
|
||
Start a ssh server. | ||
|
||
|
@@ -23,18 +27,44 @@ $ ssh2telnet -a :2222 | |
Starting ssh server on :2222 | ||
``` | ||
|
||
Connect the ssh server from the other terminal. | ||
The given username will be interpeted into the hostname you want to access. | ||
Connect the server from another terminal. | ||
The specified username will be interpeted into the hostname. | ||
Now the proxied telnet session is attached to the target host. | ||
|
||
``` | ||
$ ssh localhost -p 2222 -l 192.168.1.1 | ||
User Access Verification | ||
RP/0/RSP0/CPU0:R1#show clock | ||
Thu Nov 11 00:00:00.000 JST | ||
00:00:00:000 JST Thu Nov 11 2021 | ||
RP/0/RSP0/CPU0:R1#exit | ||
Connection to localhost closed. | ||
``` | ||
|
||
## Auto Login | ||
|
||
ssh2telnet also comes with the auto login feature. | ||
Start a ssh server with the `--login` option and specify `--login-prompt` and/or `--password-prompt` if necessary. | ||
|
||
``` | ||
$ ssh2telnet -a :2222 -l --login-prompt 'Username: ' | ||
Starting ssh server on :2222 | ||
``` | ||
|
||
Connect the server from another terminal. | ||
The specified username will be interpeted into 'username@hostname'. | ||
Login password for the target host is also prompted afterward. | ||
|
||
``` | ||
$ ssh localhost -p 2222 -l [email protected] | ||
[email protected]@localhost's password: | ||
Username: vagrant | ||
Password: | ||
RP/0/RSP0/CPU0:R1#show clock | ||
Thu Nov 11 00:00:00.000 JST | ||
00:00:00:000 JST Thu Nov 11 2021 | ||
RP/0/RSP0/CPU0:R1#exit | ||
Connection to localhost closed. | ||
|
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