{"id":3008,"date":"2018-08-23T16:22:34","date_gmt":"2018-08-23T08:22:34","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=3008"},"modified":"2018-08-23T16:22:34","modified_gmt":"2018-08-23T08:22:34","slug":"pseudo-terminal-will-not-be-allocated-because-stdin-is-not-a-terminal","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=3008","title":{"rendered":"Pseudo-terminal will not be allocated because stdin is not a terminal."},"content":{"rendered":"<p>\n\t\u6211\u4eec\u7684\u9879\u76ee\u90e8\u7f72\u5f88\u7b80\u5355\uff0c\u5199\u4e86\u4e00\u4e2a shell \u811a\u672c\u3002\u76f4\u63a5\u5728 idea \u4e2d\u7684 Terminal \u7a97\u53e3\u6267\u884c shell \u811a\u672c\u5c31\u53ef\u4ee5\u53d1\u7248\u5230\u5bf9\u5e94\u7684 sit\u3001uat \u548c pat \u73af\u5883\uff0c\u975e\u5e38\u7684\u65b9\u4fbf\u3002\u4f46\u6709\u65f6\u5019\u5728\u6267\u884c shell \u811a\u672c\u65f6\u4f1a\u62a5\u9519&ldquo;Pseudo-terminal will not be allocated because stdin is not a terminal.&rdquo;\u3002\u4e00\u51fa\u73b0\u8fd9\u4e2a\u63d0\u793a\uff0c\u90e8\u7f72\u57fa\u672c\u4e0a\u90fd\u5931\u8d25\u4e86\u3002\u6700\u8fd1\u51fa\u73b0\u8fd9\u4e2a\u7684\u6982\u7387\u6bd4\u8f83\u5927\uff0c\u56e0\u6b64\u6211\u62bd\u51fa\u4e86\u4e00\u4e9b\u65f6\u95f4\uff0c\u67e5\u4e86\u4e00\u4e9b\u8d44\u6599\uff0c\u5728\u8fd9\u91cc\u628a\u89e3\u51b3\u65b9\u6cd5\u5206\u4eab\u7ed9\u5927\u5bb6\u3002\n<\/p>\n<p>\n\t\u6839\u636e\u63d0\u793a\uff0c\u5b83\u7684\u610f\u601d\u662f\u8bf4\uff1aPseudo-terminal \u662f\u4e00\u4e2a\u4f2a\u7ec8\u7aef\uff0c\u6240\u4ee5\u4e0d\u4f1a\u88ab\u5206\u914d stdin\u3002\n<\/p>\n<p>\n\t\u4e5f\u5c31\u662f\u8bf4\uff0c\u5b83\u63d0\u793a\u6211\u4eec\u7684\u7ec8\u7aef\u4e0d\u662f\u4e00\u4e2a\u6807\u51c6\u8f93\u51fa\u7684\u7ec8\u7aef\uff0c\u65e0\u6cd5\u5206\u914d\u8fde\u63a5\u7528\u6765 ssh \u767b\u5f55\u3002\n<\/p>\n<p>\n\t\u8fd9\u548c\u670d\u52a1\u5668\u7684\u5b89\u5168\u8bbe\u7f6e\u4e5f\u6709\u4e00\u4e9b\u5173\u7cfb\uff0c\u9ed8\u8ba4\u7684\u6211\u4eec\u4e0d\u4f1a\u53bb\u6539\u52a8\u670d\u52a1\u5668\u7684\u914d\u7f6e\uff0c\u56e0\u4e3a\u6539\u52a8\u914d\u7f6e\uff0c\u53ef\u80fd\u4f1a\u53d1\u751f\u4e00\u4e9b\u610f\u60f3\u4e0d\u5230\u7684\u5b89\u5168\u4e8b\u6545\u3002\n<\/p>\n<p>\n\t\u4e8e\u662f\u6211\u4eec\u5c31\u8981\u4ece\u6211\u4eec\u7684\u90e8\u7f72\u811a\u672c\u4e0b\u624b\uff0c\u628a\u90e8\u7f72\u811a\u672c\u4e2d\u7684 ssh xttblog@ip \u6539\u4e3a ssh -tt xttblog@ip \u5373\u53ef\u3002\n<\/p>\n<p>\n\t\u8fd9\u91cc\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u52a0 -tt \u5462\uff1f\u6211\u4eec\u5728 Terminal \u6216\u8005\u5176\u4ed6\u7ec8\u7aef\u4e2d\u90fd\u53ef\u4ee5\u6b63\u5e38\u7684\u4f7f\u7528 ssh user@host \u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u3002\u4f46\u4e3a\u4ec0\u4e48\u6211\u4eec\u8fd9\u91cc\u5c31\u4e0d\u884c\u4e86\u5462\uff1f\n<\/p>\n<p>\n\t\u7b54\u6848\u5c31\u662f\u6211\u4eec\u8fd9\u91cc\u4f7f\u7528\u7684\u811a\u672c\u8fdb\u884c\u7684 ssh\u3002\u6240\u4ee5\u9700\u8981\u52a0 -tt \u53c2\u6570\u3002\n<\/p>\n<p>\n\t\u52a0 -tt \u53c2\u6570\u7684\u610f\u601d\u662f\uff1aMultiple -t options force tty allocation, even if ssh has no local tty.\n<\/p>\n<p>\n\t-t \u9009\u9879\u5f3a\u5236 TTY \u5206\u914d\uff0c\u5373\u4f7f SSH \u6ca1\u6709\u672c\u5730 TTY\u3002-t \u53c2\u6570\uff0c\u4e00\u822c\u5728\u811a\u672c\u4e2d\u4f7f\u7528\uff0c\u4e0d\u662f\u811a\u672c\u73af\u5883\u7684\u8bdd\u8fd9\u4e2a\u53c2\u6570\u53ef\u6709\u53ef\u65e0\u3002\n<\/p>\n<h2>\n\t\u53c2\u8003\u8d44\u6599<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t<a href=\"https:\/\/serverfault.com\/questions\/663211\/server-login-fail\" name=\"Server login fail\" target=\"_blank\" title=\"Server login fail\">Server login fail<\/a>\n\t<\/li>\n<li>\n\t\t<a href=\"https:\/\/github.com\/scylladb\/scylla-cluster-tests\/issues\/215\" name=\"SSH cmd error: Pseudo-terminal will not be allocated because stdin is not a terminal.\" target=\"_blank\" title=\"SSH cmd error: Pseudo-terminal will not be allocated because stdin is not a terminal.\">SSH cmd error: Pseudo-terminal will not be allocated because stdin is not a terminal.<\/a>\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=3008\">Pseudo-terminal will not be allocated because stdin is not a terminal.<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u7684\u9879\u76ee\u90e8\u7f72\u5f88\u7b80\u5355\uff0c\u5199\u4e86\u4e00\u4e2a shell \u811a\u672c\u3002\u76f4\u63a5\u5728 idea \u4e2d\u7684 Terminal \u7a97\u53e3\u6267\u884c shel [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1440,706,1130,1667,288],"class_list":["post-3008","post","type-post","status-publish","format-standard","hentry","category-java","tag-bash","tag-linux","tag-shell-","tag-ssh","tag-bug"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3008"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3008\/revisions"}],"predecessor-version":[{"id":3009,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3008\/revisions\/3009"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}