mirror of
https://github.com/nishiki/manage-password.git
synced 2025-03-19 21:04:35 +00:00
manage-password.py: fix default ssh port
This commit is contained in:
parent
2706ef3424
commit
25378c91b5
1 changed files with 6 additions and 2 deletions
8
manage-password.py
Normal file → Executable file
8
manage-password.py
Normal file → Executable file
|
@ -15,8 +15,8 @@ import tempfile
|
|||
import time
|
||||
import datetime
|
||||
|
||||
FILE_GPG = '/home/nishiki/.password-manager'
|
||||
KEY = 'nishiki@yaegashi.fr'
|
||||
FILE_GPG = '/home/adrien/.password-manager'
|
||||
KEY = 'adrien.waksberg@believedigital.com'
|
||||
FILE_PWD = '/tmp/.tmp_passwd'
|
||||
TIMEOUT_PWD = 300
|
||||
|
||||
|
@ -144,6 +144,10 @@ class ManagePasswd:
|
|||
login = result[i][self.LOGIN]
|
||||
port = result[i][self.PORT]
|
||||
passwd = result[i][self.PASSWD]
|
||||
|
||||
if not port:
|
||||
port = 22
|
||||
|
||||
if passwd:
|
||||
os.system('sshpass -p ' + passwd + ' ssh ' + login + '@' + server + ' -p ' + str(port))
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue