{"id":56,"date":"2023-11-08T22:16:38","date_gmt":"2023-11-08T21:16:38","guid":{"rendered":"https:\/\/blog.kihr.online\/?p=56"},"modified":"2023-11-08T22:20:15","modified_gmt":"2023-11-08T21:20:15","slug":"full-root-access-to-homeassistant-server","status":"publish","type":"post","link":"https:\/\/blog.kihr.online\/?p=56","title":{"rendered":"Full root access to HomeAssistant Server"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Lesedauer<\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">Minute<\/span><\/span>\n<p class=\"wp-block-paragraph\">The ssh server provided by the HomeAssistant extension only gives you minimal access. You only have the hs cli and access to the config directory.<br>In order to get full access to your server where the docker images are running you need the admin access as root on port 22222 with ssh. Here is how you can get this.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What you need<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>running HomeAssistant server<\/li>\n\n\n\n<li>USB Stick formatted with FAT<\/li>\n\n\n\n<li>ssh keypair for your account<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The USB stick must have the name CONFIG (capital letters). You copy the contents of your public key file (e.g. ~\/.ssh\/is_rsa.pub) to the root of the USB stick in the file authorized_keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then connect the USB Stick to your HomeAssitant server. Either reboot the server or on the WEB SSH Terminal that you can reach via the HomeAssitant GUI or any SSH connection to the SSH server you enter the command: ha os import<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;core-ssh \/]$ ha os import\nCommand completed successfully.\n&#91;core-ssh \/]$<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that you will be able to connect to the SSH server of the root system on port 22222:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh root@homeassistant.local -p 22222<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Please be very careful here. You need to know exactly what you are doing. It is easy to screw up the whole system.<\/mark><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Lesedauer<\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">Minute<\/span><\/span>The ssh server provided by the HomeAssistant extension only gives you minimal access. You only have the hs cli and access to the config directory.In order to get full access to your server where the docker images are running you need the admin access as root on port 22222 with ssh. Here is how you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[35],"tags":[34,33,32],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-homeassistant","tag-homeassistant","tag-root","tag-ssh","entry"],"_links":{"self":[{"href":"https:\/\/blog.kihr.online\/index.php?rest_route=\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kihr.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kihr.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kihr.online\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kihr.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":4,"href":"https:\/\/blog.kihr.online\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/blog.kihr.online\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/blog.kihr.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kihr.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kihr.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}