{"id":19241204,"url":"https://github.com/binocarlos/nubuntu","last_synced_at":"2025-02-23T14:28:11.087Z","repository":{"id":20052187,"uuid":"23320647","full_name":"binocarlos/nubuntu","owner":"binocarlos","description":"A bash script to initialize and lockdown a new Ubuntu server.","archived":false,"fork":false,"pushed_at":"2014-08-25T21:04:52.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T02:35:42.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binocarlos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-25T16:31:31.000Z","updated_at":"2014-08-25T16:31:48.000Z","dependencies_parsed_at":"2022-07-23T14:46:19.157Z","dependency_job_id":null,"html_url":"https://github.com/binocarlos/nubuntu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fnubuntu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fnubuntu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fnubuntu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fnubuntu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binocarlos","download_url":"https://codeload.github.com/binocarlos/nubuntu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240326797,"owners_count":19783910,"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-11-09T17:10:42.621Z","updated_at":"2025-02-23T14:28:11.061Z","avatar_url":"https://github.com/binocarlos.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"nubuntu\n========\n\nA bash script to initialize and lockdown a new Ubuntu server.\n\nBased on this [gist](https://gist.github.com/alanstevens/1877257)\n\n## install\n\n```bash\n$ wget -qO- https://raw.github.com/binocarlos/nubuntu/master/bootstrap.sh | sudo bash\n```\n\n## usage\n\nnubuntu has 3 commands:\n\n * update - update the system to the latest state\n * adduser - add a sudo user with a public key\n * lockdown - prevent password and root logins\n\nThese are typically run in a sequence (as root):\n\n```bash\n$ nubuntu update\n$ cat ~/mykey.pub | nubuntu adduser bob\n$ nubuntu lockdown\n```\n\nYou should reboot the server after this setup (because apt-get safe-upgrade).\n\nThe server now has hostname `myhost`, a user called bob who can sudo and uses the public key and will prevent root logins or password logins\n\n## api\n\n#### `nubuntu update`\n\nUpdate the system\n\n#### `nubuntu adduser bob [keyfile]`\n\nCreate a new sudo user with a public key.\n\nYou can either pipe the public key into this step or pass a 2nd argument that is either a local file or a http(s):// url to download the key from.\n\nAn example piping the key into a new user:\n\n```bash\n$ cat ~/mykey.pub | nubuntu user bob\n```\n\nAn example passing a file location for the key:\n\n```bash\n$ nubuntu user bob ~/bobskey.pub\n```\n\nAn example passing a HTTP endpoint for the key:\n\n```bash\n$ nubuntu user bob https://dl.dropbox.com/s/2sld4rsbhl0o093/authorized_keys?dl=1\n```\n\n#### `nubuntu lockdown`\n\nModify sshd_config to prevent password and root logins\n\nMake sure you can login with your user before running this step\n\n## license\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fnubuntu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinocarlos%2Fnubuntu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fnubuntu/lists"}