{"id":2476,"date":"2015-07-10T06:41:38","date_gmt":"2015-07-10T06:41:38","guid":{"rendered":"http:\/\/www.pir8geek.com\/?p=2476"},"modified":"2015-07-10T06:41:38","modified_gmt":"2015-07-10T06:41:38","slug":"q-shell-quick-shell-for-unix-administrator","status":"publish","type":"post","link":"https:\/\/www.jameseduard.com\/?p=2476","title":{"rendered":"Q-shell &#8211; Quick Shell for Unix Administrator"},"content":{"rendered":"<p>Q-shell is quick shell for remote login into <em><strong>Unix system<\/strong><\/em>, it use<em> blowfish crypt<\/em> algorithm to protect transport data from client to server, you can get two program: <strong>&#8216;qsh&#8217;<\/strong> for client, and <strong>&#8216;qshd&#8217;<\/strong> for server, those program can rename by any name with you prefer.<br \/>\n<strong>To Compile Q-shell:<\/strong><br \/>\nJust enter &#8216;make&#8217; and it will automation to compile, but, you must input the server key.<br \/>\nUsage:<br \/>\n1. For Server, Just run qshd on server:<\/p>\n<pre>$ .\/qshd\n<\/pre>\n<p>But, you would like to run after change it to other name, such as:<\/p>\n<pre>$ mv qshd smbd\n$ export PATH=.:$PATH\n$ smbd\n<\/pre>\n<p>2. For client, Set some environment variable, then run qsh:<\/p>\n<pre>$ export _IP=127.0.0.1\n$ export _PORT=2800\n$ unset _P\n$ .\/qsh shell\n\n<\/pre>\n<p>Now you already login into server $_IP .<br \/>\n<strong>More function:<\/strong><br \/>\nq-shell include more function to manage system:<br \/>\n1. put\/get files:<\/p>\n<pre>$ .\/qsh get \/path\/to\/server\/file .\n$ .\/qsh put \/path\/to\/local\/file  \/path\/to\/server\/file\n<\/pre>\n<p>2. Run a command on server:<\/p>\n<pre>$ .\/qsh exec 'ls -l \/bin'\n<\/pre>\n<p>3. Update server program, This function will update remote qshd, and run again:<\/p>\n<pre>$ .\/qsh update \/path\/to\/local\/qshd\n<\/pre>\n<p>4. Automation to run command on many server, Note: qsh use $_P to fetch server key, so you should erase all history data after to use $_P:<\/p>\n<pre>$ for i in {10..20} ; do \\\n      export _IP=192.168.0.$i\n      export _PORT=2800\n      export _P=key   # set key\n      .\/qsh exec 'ls -l \/bin'\n  done\n<\/pre>\n<p>5. Update password, start with version 3.2, you can update the password as below:<\/p>\n<pre>$ .\/qsh passwd\n<\/pre>\n<p>6. Download q-shell at Github Repo:\u00a0https:\/\/github.com\/qianshanhai\/q-shell<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q-shell is quick shell for remote login into Unix system, it use blowfish crypt algorithm to protect transport data from client to server, you can get two program: &#8216;qsh&#8217; for client, and &#8216;qshd&#8217; for server, those program can rename by any name with you prefer. To Compile Q-shell: Just enter &#8216;make&#8217; and it will automation<\/p>\n","protected":false},"author":1,"featured_media":2477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[522],"tags":[518,519,520,521,331],"class_list":["post-2476","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unix","tag-blowfish","tag-blowfish-crypt","tag-encryption","tag-remote-login","tag-shell"],"_links":{"self":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/2476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2476"}],"version-history":[{"count":0,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/2476\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}