{"id":16315006,"url":"https://github.com/thelfensdrfer/yii2sshconsole","last_synced_at":"2025-08-19T03:09:58.565Z","repository":{"id":16357196,"uuid":"19107218","full_name":"thelfensdrfer/yii2sshconsole","owner":"thelfensdrfer","description":"Controller with ssh commands for the yii2 console","archived":false,"fork":false,"pushed_at":"2016-07-28T09:28:50.000Z","size":13,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-12T08:57:10.972Z","etag":null,"topics":["php","ssh","yii2","yii2-console"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/thelfensdrfer.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":"2014-04-24T12:16:24.000Z","updated_at":"2024-12-16T16:16:51.000Z","dependencies_parsed_at":"2022-09-01T23:31:21.349Z","dependency_job_id":null,"html_url":"https://github.com/thelfensdrfer/yii2sshconsole","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/thelfensdrfer/yii2sshconsole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelfensdrfer%2Fyii2sshconsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelfensdrfer%2Fyii2sshconsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelfensdrfer%2Fyii2sshconsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelfensdrfer%2Fyii2sshconsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thelfensdrfer","download_url":"https://codeload.github.com/thelfensdrfer/yii2sshconsole/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelfensdrfer%2Fyii2sshconsole/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271093053,"owners_count":24697921,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["php","ssh","yii2","yii2-console"],"created_at":"2024-10-10T21:55:49.801Z","updated_at":"2025-08-19T03:09:58.540Z","avatar_url":"https://github.com/thelfensdrfer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 SSH Console\n\nController with ssh commands for the yii2 console.\n\n## Example\n\n```php\n\u003c?php namespace app\\commands;\n\nuse \\yii2sshconsole\\Controller;\n\nclass DeployController extends Controller\n{\n\tpublic $defaultAction = 'exec';\n\n\tpublic function actionExec()\n\t{\n\t\t$this-\u003econnect('example.com', [\n\t\t\t'username' =\u003e 'myusername',\n\t\t\t'password' =\u003e 'mypassword', // optional\n\t\t]);\n\n\t\t// Or via private key\n\t\t/*\n\t\t$this-\u003econnect('example.com', [\n\t\t\t'username' =\u003e 'myusername',\n\t\t\t'key' =\u003e '/path/to/private.key',\n\t\t\t'password' =\u003e 'mykeypassword', // optional\n\t\t]);\n\t\t*/\n\n\t\t$output = $this-\u003erun('echo \"test\"');\n\t\techo 'Output: ' . $output; // Output: test\n\n\t\t$output = $this-\u003erun([\n\t\t\t'cd /path/to/install',\n\t\t\t'./put_offline.sh',\n\t\t\t'git pull -f',\n\t\t\t'composer install',\n\t\t\t'./yii migrate --interactive=0',\n\t\t\t'./build.sh',\n\t\t\t'./yii cache/flush',\n\t\t\t'./put_online.sh',\n\t\t]);\n\n\t\t// Or via callback\n\t\t$this-\u003erun([\n\t\t\t'cd /path/to/install',\n\t\t\t'./put_offline.sh',\n\t\t\t'git pull -f',\n\t\t\t'composer install',\n\t\t\t'./yii migrate --interactive=0',\n\t\t\t'./build.sh',\n\t\t\t'./yii cache/flush',\n\t\t\t'./put_online.sh',\n\t\t], function($line) {\n\t\t\techo $line;\n\t\t});\n\t}\n}\n```\n\nAnd then in the local console:\n\n```bash\n./yii deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthelfensdrfer%2Fyii2sshconsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthelfensdrfer%2Fyii2sshconsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthelfensdrfer%2Fyii2sshconsole/lists"}