{"id":13610102,"url":"https://github.com/vaniacer/sshto","last_synced_at":"2025-04-12T22:32:45.354Z","repository":{"id":30758303,"uuid":"110962221","full_name":"vaniacer/sshto","owner":"vaniacer","description":"Small bash script to manage your ssh connections. It builds menu (via dialog) from your ~/.ssh/config. It can not only connect but also to run commands, copy files, tunnel ports.","archived":false,"fork":false,"pushed_at":"2024-11-15T07:40:29.000Z","size":127,"stargazers_count":584,"open_issues_count":8,"forks_count":59,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-15T08:28:49.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaniacer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["paypal.me/sshto"]}},"created_at":"2017-11-16T11:16:31.000Z","updated_at":"2024-11-15T07:40:33.000Z","dependencies_parsed_at":"2023-11-16T09:29:02.027Z","dependency_job_id":"3ac5f6ed-aa71-4a46-bbc1-fcda372607db","html_url":"https://github.com/vaniacer/sshto","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaniacer%2Fsshto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaniacer%2Fsshto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaniacer%2Fsshto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaniacer%2Fsshto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaniacer","download_url":"https://codeload.github.com/vaniacer/sshto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248641340,"owners_count":21138186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:41.213Z","updated_at":"2025-04-12T22:32:45.348Z","avatar_url":"https://github.com/vaniacer.png","language":"Shell","funding_links":["paypal.me/sshto","https://paypal.me/sshto?locale.x=en_US"],"categories":["Shell","\u003ca name=\"networking\"\u003e\u003c/a\u003eNetworking"],"sub_categories":[],"readme":"# sshto\n\u003ca href=\"https://t.me/sshtobash\"\u003e\u003cimg src=\"https://telegram.org/img/website_icon.svg\" width=\"21\"\u003e\u003c/a\u003e\n[![Twitter Follow](https://img.shields.io/twitter/follow/Vaniacer?style=social)](https://twitter.com/Vaniacer)\n[![paypal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/sshto?locale.x=en_US) \u003csup\u003eFeel free to support the project!)\u003c/sup\u003e\u003c/br\u003e\n\nSmall bash script that builds a menu (via dialog) from your ~/.ssh/config.\u003c/br\u003e\n![screeenshot](https://user-images.githubusercontent.com/18072680/60570513-69e99f00-9d7a-11e9-916d-48b74fa7585a.png)\n\u003c/br\u003e\nAllows you to connect to your servers or run commands from menu. Available commands:\u003c/br\u003e\n![cmds](https://user-images.githubusercontent.com/18072680/211161226-1c5eec5a-634b-4902-90cd-5947dd95083e.png)\n\u003c/br\u003e\nYour commands can be easily added to this list. Just edit this part of the script:\n\u003cpre\u003e\ncmdlist=(\n    #Command#    #Description#\n    \"${slct[@]}\" #De/Select command\n    \"Username\"   \"Change ssh username to \\Z1$GUEST\\Z0\"\n    \"Add tab\"    \"Add terminal tab with \\Z1sshto\\Z0 for \\Z4$target\\Z0\"\n    \"Ssh tab\"    \"Add terminal tab with \\Z1ssh\\Z0 to \\Z4$target\\Z0\"\n    ''           ''\n    \"ls -lah\"    \"List Files\"\n    \"free -h\"    \"Show free memory\"\n    \"df  -ih\"    \"Show free inodes\"\n    \"df   -h\"    \"Show free disk space\"\n    \"Custom\"     \"Run custom command on \\Z4$target\\Z0\"\n    \"Script\"     \"Run custom script on \\Z4$target\\Z0\"\n    ''           ''\n    'Yes'        \"Say 'yes' to SSH\"\n    \"Info\"       \"Full system info\"\n    'Fix_id'     \"Update host in known_hosts\"\n    \"Sshkey\"     \"Add my ssh key to \\Z4$target\\Z0\"\n    \"Alias\"      \"Add my useful aliases to \\Z4$target\\Z0\"\n    \"Copy\"       \"Copy selected file or dir to \\Z4$target\\Z0\"\n    ''           ''\n    \"Home\"       \"Change home folder \\Z4$home\\Z0 on local server\"\n    \"Dest\"       \"Change destination folder \\Z4$DEST\\Z0 on \\Z4$target\\Z0\"\n    \"Upload\"     \"Upload file or folder from \\Z4$home\\Z0 to \\Z4$target:${DEST}\\Z0\"\n    \"Download\"   \"Download file or folder from \\Z4$target:${DEST}\\Z0 to \\Z4$home\\Z0\"\n    \"Mount\"      \"Mount remote folder \\Z4$target:$DEST\\Z0 to \\Z4$home\\Z0\"\n    \"Unmount\"    \"Unmount remote folder \\Z4$target:$DEST\\Z0 from \\Z4$home\\Z0\"\n    ''           ''\n    \"Local\"      \"Change local  port \\Z1$LOCAL\\Z0\"\n    \"Remote\"     \"Change remote port \\Z1$REMOTE\\Z0\"\n    \"Tunnel\"     \"Start portunneling from \\Z4$target:$REMOTE\\Z0 to \\Z4localhost:$LOCAL\\Z0\"\n    ''           ''\n    \"ShowConf\"   \"Show ssh config for this host\"\n    \"EditConf\"   \"Edit ssh config for this host\"\n)\n\u003c/pre\u003e\nFirst collumn - command, second - description.\u003c/br\u003e\nSimple commands like `ls -la` could be added as is.\u003c/br\u003e\nA list of commands or a complicated logic should be added via function.\u003c/br\u003e\nEmpty values(`''`) could be used as a delimiter.\u003c/br\u003e\nYou can quick jump to the selected server via \u003ci\u003eCONNECT\u003c/i\u003e button.\u003c/br\u003e\nTo close \u003ci\u003essh\u003c/i\u003e session press \u003ckbd\u003eCTRL\u003c/kbd\u003e+\u003ckbd\u003eD\u003c/kbd\u003e or run `exit` command, it'll bring you back to \u003ci\u003esshto\u003c/i\u003e commands section.\u003c/br\u003e\n\u003c/br\u003e\nOptional hosts description could be added like this:\u003c/br\u003e\n\u003cpre\u003e\nHost server1 #Description, it could be more than one word\nHostName 192.168.0.1\nPort 22\nUser admin\n\u003c/pre\u003e\nOptional start menu delimiters '---{ Group Name }---' could be added like this:\u003c/br\u003e\n\u003cpre\u003e\n#Host DUMMY #Group Name#\n\u003c/pre\u003e\nIf you are unhappy with this 'DUMMY' group name template, or you actually have a host named 'dummy',\nyou can change this template by ajusting this variable `group_id=dummy`. \u003c/br\u003e\nAll these additions won't break your *ssh configs* coz they are considered as comments.  \n\n------\n~/.ssh/config example:\n\u003cpre\u003e\n#Host DUMMY #Rybinsk#\n\nHost rybserver1 #First server\nHostName localhost\n\nHost rybserver2 #Second server\nHostName localhost\n\nHost rybserver3 #Third server\nHostName localhost\n\n#Host DUMMY #Moscow#\n\nHost moserver1 #First server\nHostName localhost\n\nHost moserver2 #Second server\nHostName localhost\n\nHost moserver3 #Third server\nHostName localhost\n\u003c/pre\u003e\nScript greps data from multiple config files via pattername `config*` in `~/.ssh` dir.\u003c/br\u003e\nSo you can split config to multiple files and use them with \u003ci\u003eInclude\u003c/i\u003e directive, example:\n\u003cpre\u003e\nInclude config_moscow\nInclude config_rybinsk\nInclude config*\n\u003c/pre\u003e\nAll preset variables and functions could be tweaked via `~/.sshtorc` config file:\n\u003cpre\u003e\necho \"REMOTE=9000  # Remote port for tunneling.\" \u003e\u003e ~/.sshtorc\n\u003c/pre\u003e\n\nYou can customize dialog itself a bit by creating and editing its config file:\n\u003cpre\u003e\ndialog --create-rc ~/.dialogrc\nnano ~/.dialogrc\n\u003c/pre\u003e\n\nIf you don't have dialog and don't want(or can't) to install it, there is a dialog-less version of sshto\nin my new project [bashui](https://github.com/vaniacer/bashui) here is how it looks:\n![bashui-hosts](https://habrastorage.org/getpro/habr/upload_files/024/c74/38e/024c7438e6429f5e37a8a71d98bf7edb.png)\n\n![bashui-commands](https://habrastorage.org/getpro/habr/upload_files/495/2cc/526/4952cc52616db16acfa7b2fd9e8d366f.png)\n\nTry it [bashui-sshto](https://github.com/vaniacer/bashui/blob/master/demo_sshto)!\n\n# How to install\nClone\\download this project, go to it's folder and run:\n\u003cpre\u003esudo cp sshto /usr/bin/\n\n#and to unistall\nsudo rm /usr/bin/sshto\n\u003c/pre\u003e\n\n\u003ca href=\"https://asciinema.org/a/PQMuRvfmxlHUc4oZMN76LY2V4\"\u003eSee how it works at asciinema\u003c/a\u003e\u003c/br\u003e\n\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=FhnsVH8t96Q\n\" target=\"_blank\"\u003e\u003cimg src=\"http://img.youtube.com/vi/FhnsVH8t96Q/0.jpg\" \nalt=\"ssh config guide\" width=\"240\" height=\"180\" border=\"10\"/\u003e\u003c/a\u003e\u003c/br\u003e\nTom Lawrens video guide about ssh config and sshto\n\n\u003ca href=\"https://t.me/sshtobash\"\u003e\u003cimg src=\"https://telegram.org/img/website_icon.svg\" width=\"21\"\u003e\u003c/a\u003e\n[![Twitter Follow](https://img.shields.io/twitter/follow/Vaniacer?style=social)](https://twitter.com/Vaniacer)\n[![paypal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/sshto?locale.x=en_US) \u003csup\u003eFeel free to support the project!)\u003c/sup\u003e\u003c/br\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaniacer%2Fsshto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaniacer%2Fsshto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaniacer%2Fsshto/lists"}