20 lines
378 B
Python
Executable File
20 lines
378 B
Python
Executable File
#!/bin/python
|
|
|
|
import os
|
|
|
|
path = os.path.expanduser('~') + "/.ssh/config"
|
|
|
|
f = open(path,"r")
|
|
lines = f.readlines()
|
|
|
|
#ping -c 1 -w 1
|
|
|
|
print(lines.count())
|
|
|
|
for l in lines:
|
|
if "host " in l:
|
|
ssh_host = l.split()[1]
|
|
command = f"infocmp | ssh {ssh_host} 'tic -x /dev/stdin'"
|
|
print("Sending terminfo to: " + ssh_host)
|
|
print("Command: " + command)
|