Alfred workflow for auto login in iterm2
Common login case is easy, you can send ssh root@ip
and input passwd
. Also you can use ssh-keygen
to generate key for no password login.
According to above information, you can make simple workflow like alfred-ssh, making login more smart.
Alfred-ssh which reading login information from hosts config has some disadvantages.
- When machines number grow, we can't find dest machine info quickly.
- In some cases, our login server routine is
localhost->jumper->dest_server
, so Alfred-ssh cannot work well.
What iterm-flow
do is
- Providing
gen.go
for generating alfred env through machine info input. - Providing efficient way for search machine info.
- Providing quick login method with less artificial work.
- Download latest version and install it.
- Add Alfred workflow env variables.
- You can use gen.go to generate env
- Or you can generate env by yourself:
Adding a server, you should add an envName
is server name,Value
is json format, the field withomitempty
is optional.type Node struct { Tags []string `json:"tags"` IP string `json:"ip"` Port string `json:"port,omitempty"` User string `json:"user,omitempty"` Passwd string `json:"passwd,omitempty"` Depend string `json:"depend,omitempty"` }
- Quickly login
- About login passwd:
Passwd is very important, I recommend you don't generate passwd when generate json env. You can call the password manager of Iterm2 byoption+comman+f
. More you can do like this
- Managing server login information [Add/Del/List]
- Auto login with/without dependency node
- Login with passwd or login without passwd
- Auto set current iterm2 tab title as server name[env Name]
// run gen.go
# go run tools/gen.go
// build list.go
# go build list.go
- I get much info from vitorgalvao/custom-alfred-iterm-scripts