{"id":210,"date":"2021-07-07T11:39:57","date_gmt":"2021-07-07T08:39:57","guid":{"rendered":"https:\/\/dev-word.com\/?p=210"},"modified":"2022-01-03T08:13:45","modified_gmt":"2022-01-03T06:13:45","slug":"remotely-add-linux-host-to-teamviewer-account","status":"publish","type":"post","link":"https:\/\/dev-word.com\/index.php\/2021\/07\/07\/remotely-add-linux-host-to-teamviewer-account\/","title":{"rendered":"Remotely Add Linux Host To TeamViewer Account"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"681\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-1024x681.jpg\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-1024x681.jpg 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-300x200.jpg 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-768x511.jpg 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-1536x1022.jpg 1536w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-2048x1363.jpg 2048w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/glenn-carstens-peters-EOQhsfFBhRk-unsplash-1200x798.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Working remotely has become a standard these days, and accessing our computers remotely has become a necessity. In the life of a developer, this necessity is even greater if you add to your list a secondary computer, the office computer, a home lab, test machines, virtual machines, and so on. Although the terminal is enough to do a remote job, there are situations when you need to actually see the screen and run some desktop applications on it. In the following sections, I will detail how to install and configure Team Viewer on Linux remotely so you can access it easily using the application. Team Viewer is one of the most popular remote access and control applications, and the best thing about it is that it is cross-platform!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>sudo credentials to access the remote machine<\/li><li>a Team Viewer account<\/li><li>a terminal<\/li><\/ul>\n\n\n\n<p><em>For this article, I&#8217;ll be using two hosts, one running <strong>Ubuntu 20.04LTS<\/strong> and one running <strong>Fedora 34<\/strong>. The machines will be accessible via <strong>SSH<\/strong>.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ubuntu<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Connect to your host<\/h4>\n\n\n\n<p>Open a terminal and connect to your host using <strong>SSH<\/strong>. <\/p>\n\n\n\n<p><em>The host must have an <strong>SSH Server<\/strong> running for this to work as it is not installed by default.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh username@host<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-09.59.32-1024x856.png\" alt=\"\" class=\"wp-image-222\" width=\"768\" height=\"642\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-09.59.32-1024x856.png 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-09.59.32-300x251.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-09.59.32-768x642.png 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-09.59.32-1200x1003.png 1200w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-09.59.32.png 1364w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Install TeamViewer<\/h4>\n\n\n\n<p>Install <strong>Team Viewer <\/strong>using the latest official package.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\nwget https:\/\/download.teamviewer.com\/download\/linux\/teamviewer_amd64.deb\nsudo apt install .\/teamviewer_amd64.deb -y\nsudo teamviewer daemon start\n# Make teamviewer start when the system turns on\nsudo teamviewer daemon enable<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Set up TeamViewer<\/h4>\n\n\n\n<p>Next, we are going to use the <strong>TeamViewer CLI<\/strong> to connect the host to the official account.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo teamviewer setup<\/code><\/pre>\n\n\n\n<p>You&#8217;ll be asked to accept the License Agreement and then to input your <strong>username<\/strong> and <strong>password<\/strong>. The first login will fail as TeamViewer requires the user to trust devices before adding them to the account list. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-3-1024x856.png\" alt=\"\" class=\"wp-image-230\" width=\"768\" height=\"642\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-3-1024x856.png 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-3-300x251.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-3-768x642.png 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-3-1200x1003.png 1200w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-3.png 1364w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Step 4: Trust the device<\/h4>\n\n\n\n<p>At this point, you will have to open your email and <strong>trust<\/strong> the device.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1.png\" alt=\"\" class=\"wp-image-226\" width=\"442\" height=\"351\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1.png 884w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1-300x238.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1-768x610.png 768w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/figure><\/div>\n\n\n\n<p>Once you&#8217;ve added the device to the trusted list, type the username and password into the terminal. Select <strong>yes<\/strong> when asked if you want to add the host to your computers group. And that&#8217;s it!<\/p>\n\n\n\n<p>Now, if you log in to the TeamViewer app, you&#8217;ll see the newly added host.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28-1024x843.png\" alt=\"\" class=\"wp-image-227\" width=\"768\" height=\"632\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28-1024x843.png 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28-300x247.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28-768x632.png 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28-1536x1264.png 1536w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28-1200x988.png 1200w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.26.28.png 1604w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Other Commands<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Stop Teamviewer\nsudo teamviewer daemon stop\n\n# TeamViewer won't start automatically when the system turns on\nsudo teamviewer daemon disable\n\n# Uninstall TeamViewer\nsudo apt purge teamviewer -y<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-background has-cyan-bluish-gray-background-color has-cyan-bluish-gray-color\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Fedora<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Connect to your host<\/h4>\n\n\n\n<p>Open a terminal and connect to your host using <strong>SSH<\/strong>. <\/p>\n\n\n\n<p><em>The host must have an <strong>SSH Server<\/strong> running for this to work as it is not installed by default.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh username@host<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"856\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.34.48-1024x856.png\" alt=\"\" class=\"wp-image-231\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.34.48-1024x856.png 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.34.48-300x251.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.34.48-768x642.png 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.34.48-1200x1003.png 1200w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.34.48.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Install TeamViewer<\/h4>\n\n\n\n<p>Install <strong>Team Viewer <\/strong>using the latest official package.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\nwget https:\/\/download.teamviewer.com\/download\/linux\/teamviewer.x86_64.rpm\nsudo dnf -y install teamviewer.x86_64.rpm\nsudo teamviewer daemon start\n# Make teamviewer start when the system turns on\nsudo teamviewer daemon enable<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Set up TeamViewer<\/h4>\n\n\n\n<p>Next, we are going to use the <strong>TeamViewer CLI<\/strong> to connect the host to the official account.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo teamviewer setup<\/code><\/pre>\n\n\n\n<p>You&#8217;ll be asked to accept the License Agreement and then to input your <strong>username<\/strong> and <strong>password<\/strong>. The first login will fail as TeamViewer requires the user to trust devices before adding them to the account list. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-2-1024x856.png\" alt=\"\" class=\"wp-image-229\" width=\"768\" height=\"642\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-2-1024x856.png 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-2-300x251.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-2-768x642.png 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-2-1200x1003.png 1200w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.13.51-2.png 1364w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Step 4: Trust the device<\/h4>\n\n\n\n<p>At this point, you will have to open your email and <strong>trust<\/strong> the device.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1.png\" alt=\"\" class=\"wp-image-226\" width=\"442\" height=\"351\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1.png 884w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1-300x238.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.17.00-1-768x610.png 768w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/figure><\/div>\n\n\n\n<p>Once you&#8217;ve added the device to the trusted list, type the username and password into the terminal. Select <strong>yes<\/strong> when asked if you want to add the host to your computers group. And that&#8217;s it!<\/p>\n\n\n\n<p>Now, if you log in to the TeamViewer app, you&#8217;ll see the newly added host.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"843\" src=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56-1024x843.png\" alt=\"\" class=\"wp-image-232\" srcset=\"https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56-1024x843.png 1024w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56-300x247.png 300w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56-768x632.png 768w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56-1536x1264.png 1536w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56-1200x988.png 1200w, https:\/\/dev-word.com\/wp-content\/uploads\/2021\/07\/Screenshot-2021-07-04-at-10.40.56.png 1604w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Other Commands<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Stop Teamviewer\nsudo teamviewer daemon stop\n\n# TeamViewer won't start automatically when the system turns on\nsudo teamviewer daemon disable\n\n# Uninstall TeamViewer\nsudo dnf remove teamviewer -y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>Installing TeamViewer using the terminal is pretty straightforward, and the CLI is straightforward to use. The TeamViewer team provides some more options that can be inspected using <code data-enlighter-language=\"shell\" class=\"EnlighterJSRAW\">man teamviewer<\/code> or <code data-enlighter-language=\"shell\" class=\"EnlighterJSRAW\">teamviewer --help<\/code> for a shorter version.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working remotely has become a standard these days, and accessing our computers remotely has become a necessity. In the life of a developer, this necessity is even greater if you add to your list a secondary computer, the office computer, a home lab, test machines, virtual machines, and so on. Although the terminal is enough&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,15,20],"tags":[19,16,17,18],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-fedora","category-linux","category-ubuntu","tag-fedora","tag-linux","tag-team-viewer","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":13,"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/posts\/210\/revisions\/273"}],"wp:attachment":[{"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev-word.com\/index.php\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}