{"id":1267,"date":"2026-03-03T16:49:55","date_gmt":"2026-03-03T07:49:55","guid":{"rendered":"https:\/\/absol.kr\/?p=1267"},"modified":"2026-03-03T16:49:55","modified_gmt":"2026-03-03T07:49:55","slug":"termux-ubuntu-sshd-%eb%a9%88%ec%b6%a4-%ed%95%b4%ea%b2%b0-%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/absol.kr\/?p=1267","title":{"rendered":"termux ubuntu sshd \uba48\ucda4 \ud574\uacb0 \ubc29\ubc95"},"content":{"rendered":"\n<p><strong>Termux Ubuntu(proot-distro)\uc5d0\uc11c sshd\uac00 \uc8fc\uae30\uc801\uc73c\ub85c \uba48\ucd94\ub294 \uc774\uc720\uc640 \ud574\uacb0\ubc95\uc785\ub2c8\ub2e4.<\/strong>&nbsp;proot \ud658\uacbd\uc758 PID 1 \uc81c\ud55c + Android \ubc30\ud130\ub9ac \ucd5c\uc801\ud654\uac00 \uc6d0\uc778\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\uc8fc\uc694 \uc6d0\uc778<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>proot \uc885\ub8cc \uc2dc sshd\ub3c4 \uc885\ub8cc<\/strong>\u00a0(\ubd80\ubaa8 \ud504\ub85c\uc138\uc2a4 kill)<\/li>\n\n\n\n<li><strong>Android PPK<\/strong>\u00a0(\ubc31\uadf8\ub77c\uc6b4\ub4dc \ud504\ub85c\uc138\uc2a4 kill)<\/li>\n\n\n\n<li><strong>\ud3ec\ud2b8 \ucda9\ub3cc<\/strong>\u00a0(Termux \uae30\ubcf8 8022\uc640 \uacb9\uce68)<\/li>\n\n\n\n<li><strong>\ub85c\uadf8\uc544\uc6c3 \ud0c0\uc784\uc544\uc6c3<\/strong>\u00a0(KeepAlive \uc5c6\uc74c)<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\uc644\uc804 \ud574\uacb0 \ub2e8\uacc4<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">1\ub2e8\uacc4: \uc62c\ubc14\ub978 sshd \uc124\uc815<\/h2>\n\n\n\n<p><strong>Ubuntu \ub0b4 (proot \ub85c\uadf8\uc778 \ud6c4)<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<br><code><em># \ud328\ud0a4\uc9c0 \uc124\uce58<\/em><br>sudo apt install openssh-server -y<br><br><em># \ud638\uc2a4\ud2b8\ud0a4 \uc0dd\uc131<\/em><br>sudo ssh-keygen -A<br><br><em># \ud3ec\ud2b8 \ubcc0\uacbd (Termux 8022\uc640 \uad6c\ubd84)<\/em><br>sudo sed -i 's\/#Port 22\/Port 10022\/' \/etc\/ssh\/sshd_config<br>sudo sed -i 's\/#PermitRootLogin prohibit-password\/PermitRootLogin yes\/' \/etc\/ssh\/sshd_config<br><br><em># KeepAlive \ud65c\uc131\ud654 (\uc8fc\uc694 \ud574\uacb0!)<\/em><br>echo \"ClientAliveInterval 60\" | sudo tee -a \/etc\/ssh\/sshd_config<br>echo \"ClientAliveCountMax 3\" | sudo tee -a \/etc\/ssh\/sshd_config<br><br>sudo systemctl restart ssh  <em># \ub610\ub294 \uc218\ub3d9 \uc2dc\uc791<\/em><br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2\ub2e8\uacc4: tmux\ub85c sshd \ub370\ubaac\ud654 (\ud504\ub85c\uc138\uc2a4 \uc0dd\uc874)<\/h2>\n\n\n\n<p><strong>Ubuntu \ub0b4 \uc804\uc6a9 tmux \uc138\uc158<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<br><code>apt install tmux -y<br>tmux new-session -d -s sshd<br>tmux send-keys -t sshd \"\/usr\/sbin\/sshd -D -p 10022\" Enter<br>tmux list-sessions  <em># \ud655\uc778<\/em><br><\/code><\/pre>\n\n\n\n<p><strong>tmux \uc138\uc158\uc740 proot \uc885\ub8cc\ud574\ub3c4 \uc0b4\uc544\uc788\uc74c<\/strong>.<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/www.reddit.com\/r\/linuxquestions\/comments\/jffgyu\/systemd_servers_works_as_root_user_but_not_as_non\/\"><\/a>\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3\ub2e8\uacc4: Termux\/Android \ucd5c\uc801\ud654<\/h2>\n\n\n\n<p><strong>Termux \uc571<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">text<br><code>termux-wake-lock  # \ubc30\ud130\ub9ac \ucd5c\uc801\ud654 \ubb34\uc2dc<br><\/code><\/pre>\n\n\n\n<p><strong>Android \uc124\uc815<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc124\uc815 > \uc571 > Termux >\u00a0<strong>\ubc30\ud130\ub9ac > \ucd5c\uc801\ud654 \uc548\ud568<\/strong><\/li>\n\n\n\n<li>\uac1c\ubc1c\uc790 \uc635\uc158 >\u00a0<strong>\ubc31\uadf8\ub77c\uc6b4\ub4dc \ud504\ub85c\uc138\uc2a4 \uc81c\ud55c \uc5c6\uc74c<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4\ub2e8\uacc4: \uc811\uc18d \ud14c\uc2a4\ud2b8<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">text<br><code># \uc678\ubd80\uc5d0\uc11c (\ud3ec\ud2b8 10022)<br>ssh -p 10022 root@[\ud3f0IP]<br><br># \ub0b4\ubd80 Termux\uc5d0\uc11c<br>ssh -p 10022 root@localhost<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\ubaa8\ub2c8\ud130\ub9c1 &amp; \uc720\uc9c0<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<br><code><em># Ubuntu \ub0b4 \uc0c1\ud0dc \ud655\uc778<\/em><br>ss -tlnp | grep 10022<br>ps aux | grep sshd<br><br><em># tmux \uc7ac\uc5f0\uacb0 (sshd \uba48\ucdc4\uc744 \ub54c)<\/em><br>tmux attach -t sshd<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"profile\">\uc790\ub3d9 \uc2dc\uc791 \uc2a4\ud06c\ub9bd\ud2b8 (~\/.profile)<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<br><code>#!\/bin\/bash<br><em># Ubuntu \ub85c\uadf8\uc778 \uc2dc \uc790\ub3d9 sshd \uc7ac\uc2dc\uc791<\/em><br>if ! pgrep -f \"sshd.*10022\" > \/dev\/null; then<br>    tmux new-session -d -s sshd \"\/usr\/sbin\/sshd -D -p 10022\"<br>    echo \"sshd restarted on port 10022\"<br>fi<br><\/code><\/pre>\n\n\n\n<p><code>chmod +x ~\/.profile<\/code><\/p>\n\n\n\n<p><strong>tmux + KeepAlive \uc870\ud569\uc73c\ub85c 99% \uc548\uc815\ud654\ub429\ub2c8\ub2e4.<\/strong>&nbsp;proot \uc885\ub8cc\ud574\ub3c4 SSH \uc5f0\uacb0 \uc720\uc9c0! \ud3ec\ud2b8&nbsp;<code>ip a<\/code>\ub85c \ud655\uc778<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Termux Ubuntu(proot-distro)\uc5d0\uc11c sshd\uac00 \uc8fc\uae30\uc801\uc73c\ub85c \uba48\ucd94\ub294 \uc774\uc720\uc640 \ud574\uacb0\ubc95\uc785\ub2c8\ub2e4.&nbsp;proot \ud658\uacbd\uc758 PID 1 \uc81c\ud55c + Android \ubc30\ud130\ub9ac \ucd5c\uc801\ud654\uac00 \uc6d0\uc778\uc785\ub2c8\ub2e4. \uc8fc\uc694 \uc6d0\uc778 \uc644\uc804 \ud574\uacb0 \ub2e8\uacc4 1\ub2e8\uacc4: \uc62c\ubc14\ub978 sshd \uc124\uc815 Ubuntu \ub0b4 (proot \ub85c\uadf8\uc778 \ud6c4): bash# \ud328\ud0a4\uc9c0 \uc124\uce58sudo apt install openssh-server -y# \ud638\uc2a4\ud2b8\ud0a4 \uc0dd\uc131sudo ssh-keygen -A# \ud3ec\ud2b8 \ubcc0\uacbd (Termux 8022\uc640 \uad6c\ubd84)sudo sed -i &#8216;s\/#Port 22\/Port 10022\/&#8217; \/etc\/ssh\/sshd_configsudo sed -i &#8216;s\/#PermitRootLogin &hellip; <a href=\"https:\/\/absol.kr\/?p=1267\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;termux ubuntu sshd \uba48\ucda4 \ud574\uacb0 \ubc29\ubc95&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1267","post","type-post","status-publish","format-standard","hentry","category-d-service"],"_links":{"self":[{"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts\/1267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1267"}],"version-history":[{"count":2,"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts\/1267\/revisions"}],"predecessor-version":[{"id":1269,"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts\/1267\/revisions\/1269"}],"wp:attachment":[{"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}