Skip to main content

This is a SSH login tool

Installation

pip install --upgrade 0lever-so
or
pip install --upgrade 0lever-so -i https://pypi.org/simple/

Usage

# 初始化配置文件,升级无需初始化,chmod 400 ~/.so/keys/*
➜  ~ so_install
➜  ~ cd .so
➜  .so tree
.
├── keys
│   └── demo.pem
└── password.yaml

1 directory, 2 files
➜  .so
# 配置文件
ssh:
  - id: 1
    name: demo1
    user: fqiyou
    password: xxx
    host: 1.1.1.1
    port: 20755
  - id: 2
    name: demo2
    user: fqiyou
    password: xxx
    host: 1.1.1.1
    port: 39986
  - id: 3
    name: demo3
    user: root
    password: demo.pem
    host: 1.1.1.1
    port: 22

Other-shell


#!/usr/bin/expect
set USER "xxx"
set PASSWD "xxx"
set timeout 10

trap {
    set rows [stty rows]
    set cols [stty columns]
    stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH
spawn su - $USER
expect "Password: "
send "$PASSWD\n"
interact
#!/usr/bin/expect -f
set HOST [lindex $argv 0]
set USER [lindex $argv 1]
set PASSWD [lindex $argv 2]
set PORT [lindex $argv 3]
set timeout 10

trap {
    set rows [stty rows]
    set cols [stty columns]
    stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH

spawn ssh $USER@HOST -p $PORT
expect {
    "*yes/no" {send "yes\r"; exp_continue}
    "*password:" {send "$PASSWD\r"}
}
interact
```

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

0lever_so-2.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

0lever_so-2.0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file 0lever_so-2.0.1.tar.gz.

File metadata

  • Download URL: 0lever_so-2.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for 0lever_so-2.0.1.tar.gz
Algorithm Hash digest
SHA256 6c21294cde22b93c8c7539bd6e01ce1ecd0e1f8c9c729806b5f5809b5a7c30d8
MD5 a4a2f0dfbb22bffc0f253bc9043e4d9b
BLAKE2b-256 42f0bc3471c0f05af93a04e00ab2fb5c430295f167181f46a8d1b40dcee4f42a

See more details on using hashes here.

File details

Details for the file 0lever_so-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: 0lever_so-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for 0lever_so-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d753a5a2238f8b3b40c9c5ed089351e9e2d88b650c51f5d9224e63fbc2e9a51e
MD5 aff8324706e5a56452bbbd8e842adaca
BLAKE2b-256 afc9f7df2b95ef92451355fd1810363b04f292e217e842d6aea8c1953faac12b

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.3

2 files

2.0.2

2 files

This release

2.0.1 This release

2 files

1.9.1

2 files

1.9.0

1 file

1.2.0

1 file

1.1.3

1 file

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.9

2 files

1.0.8

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page