{"id":13492566,"url":"https://github.com/danielfireman/tget","last_synced_at":"2025-07-20T22:33:11.771Z","repository":{"id":78477152,"uuid":"48433140","full_name":"danielfireman/tget","owner":"danielfireman","description":"Easily download files trough ssh tunelling.","archived":false,"fork":false,"pushed_at":"2015-12-22T17:57:57.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T13:04:44.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielfireman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-22T13:23:33.000Z","updated_at":"2019-02-22T17:56:03.000Z","dependencies_parsed_at":"2023-03-16T02:16:37.542Z","dependency_job_id":null,"html_url":"https://github.com/danielfireman/tget","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielfireman/tget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfireman%2Ftget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfireman%2Ftget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfireman%2Ftget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfireman%2Ftget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielfireman","download_url":"https://codeload.github.com/danielfireman/tget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfireman%2Ftget/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266210835,"owners_count":23893337,"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-07-31T19:01:07.138Z","updated_at":"2025-07-20T22:33:11.753Z","avatar_url":"https://github.com/danielfireman.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# tget\nSuper simple binary that prints a command based on ssh, scp and wget to fetch files via tunneling. Can be handy when working remotely and need to download files that can only be acessed via a firewall-protected network.\n\nFor instance, assuming if you would like to fetch http://foo.bar/fireman/public/myarticle.pdf but you could only access foo.bar ssh'ing fireman@bez:22. You could do this by running:\n\n```sh\n$ tget http://foo.bar/fireman/public/myarticle.pdf fireman@bez:22\nCommand to execute: ssh -t -o StrictHostKeyChecking=no fireman@bez:22 wget http://foo.bar/fireman/public/myarticle.pdf -O /tmp/myarticle.pdf; scp fireman@bez:22:/tmp/myarticle.pdf /tmp/myarticle.pdf\n```\n\nand then executing the printed command:\n\n```sh\n$ ssh -t -o StrictHostKeyChecking=no fireman@bez:22 wget http://foo.bar/fireman/public/myarticle.pdf -O /tmp/myarticle.pdf; scp fireman@bez:22:/tmp/myarticle.pdf /tmp/myarticle.pdf\n```\n\nThe file is going to placed at /tmp.\n\n## What is actually happenning?\n\nLets assume the following call:\n\n```sh\n$ tget http://foo.bar/fireman/public/myarticle.pdf fireman@bez:22 bizz\nCommand to execute: ssh -t -o StrictHostKeyChecking=no fireman@bez:22 'ssh -t -o StrictHostKeyChecking=no bizz wget http://foo.bar/fireman/public/myarticle.pdf -O /tmp/myarticle.pdf; scp bizz:/tmp/myarticle.pdf /tmp/myarticle.pdf'; scp fireman@bez:22:/tmp/myarticle.pdf /tmp/myarticle.pdf\n```\n\nAnd to make things easier, lets parse the reverse hosts and their command executions:\n\n* bizz\n    * wget http://foo.bar/fireman/public/myarticle.pdf -O /tmp/myarticle.pdf\n\n* fireman@bez:22\n    * ssh to bizz and execution of the commands listed above\n    * scp bizz:/tmp/myarticle.pdf /tmp/myarticle.pdf\n\n* locally\n    * ssh to fireman@bez:22 and execution of the commands listed above\n    * scp fireman@bez:22:/tmp/myarticle.pdf /tmp/myarticle.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfireman%2Ftget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielfireman%2Ftget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfireman%2Ftget/lists"}