Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Yesterday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Problems and Troubleshooting
Github Action SSH to remote user using private key.
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="DevOps_Boy" data-source="post: 29258415" data-attributes="member: 584464"><p>මචන්. මම ඩිප්ලෝයිමන්ට් කරනවා github action වලින්. ගොඩක් aws servers. pem file තියන නිසා අවුලක් නෑ. ඒත් මට තව සර්වර් එකක් දුන්නා ඩෙප්ලොයිමන්ට් දාන්න. ඒක AWS නෙමෙයි තියෙන්නේ. dialog IDC එකේ virtual server එකක්. අනිත් aws servers වලට අවුලක් නෑ ගානට වැඩේ වෙනවා. ඒත් මේ සර්වර් එකට දාන්න බෑ Error එකක් එනවා. මම ඒක දන්නම් පහතින්. මම ඩිප්ලෝයි කරන්න යූස් කරන්නෙ github market place eken gaththu rsync module එකක්. මම ඒ සර්වර් එකේ අලුත් යූසර් කෙනෙක් හැදුවා deployer කියල.ඊටපස්සේ ඒ යූසර්ට ssh keys දැම්මා. මොකද මම යූස් කරන මොඩියුල් එකට අනිවා .PEM file එකක් දෙන්න ඔනේ. මට අලුතින් හම්බුන සර්වර් එක Password and username ගහලා ලොග් වෙන්න remote SSH කරන්න පුලුව්න්. ඒත් winscp කරන්න යද්දි server refesed our key කියලා එනවා. මම /etc/ssh/sshd_config file එකේ PubkeyAuthentication yes කරලා SSH restart කලා. හැබැයි අලුත් username and password වලින් ssh කරන්න පුලුවන් අවුලක් නැතුව. winscp එකෙනුයි github action එකෙනුයි තමා බැරි. chatGPT එකේ තිබ්බ ඒවත් try කලාට හරි ගියේ නෑ. මේකට මොකද්ද කරන්න පුලුව්න්?????</p><p></p><p>මම remote server එකෙ private key generate කලේ මෙකෙන් - "ssh-keygen -m PEM -t rsa -b 4096"</p><p></p><p><strong><em><span style="font-size: 22px">script</span></em></strong>:</p><p>[CODE=yaml]name: Deploy to WAR files to github AWS LightSail</p><p>on:</p><p> push:</p><p> branches: main</p><p></p><p>jobs:</p><p> Get_code:</p><p> runs-on: ubuntu-20.04</p><p> steps:</p><p> - name: Get code</p><p> uses: actions/checkout@v4</p><p> - name: Getting deatails of the server</p><p> run: |</p><p> lscpu</p><p> free -h</p><p> - name: Go to folder</p><p> run: |</p><p> cd /home/runner/work/API-Service/API-Service</p><p> ls -l</p><p> - name: Deploy to the Dialer server.</p><p> uses: easingthemes/ssh-deploy@main</p><p> with:</p><p> SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_TEST }}</p><p> SOURCE: "*"</p><p> REMOTE_HOST: "202.129.81.20"</p><p> REMOTE_PORT: "22"</p><p> REMOTE_USER: "deployer"</p><p> TARGET: "/opt/cicd_testing/api"[/CODE][CODE][/CODE]</p><p></p><p></p><p><strong><em><span style="font-size: 22px">error</span></em>:</strong></p><p>[CODE]Run easingthemes/ssh-deploy@main</p><p> with:</p><p> SSH_PRIVATE_KEY: ***</p><p> SOURCE: *</p><p> REMOTE_HOST: 202.129.81.20</p><p> REMOTE_PORT: 22</p><p> REMOTE_USER: deployer</p><p> TARGET: /opt/cicd_testing/api</p><p> ARGS: -rlgoDzvc -i</p><p> SSH_CMD_ARGS: -o StrictHostKeyChecking=no</p><p>[DIR] Creating /home/runner/.ssh dir in workspace root</p><p>✅ [DIR] dir created.</p><p>[FILE] writing /home/runner/.ssh/known_hosts file ... 0</p><p>✅ [SSH] known_hosts file ensured /home/runner/.ssh</p><p>✅ [DIR] /home/runner/.ssh dir exist</p><p>[FILE] writing /home/runner/.ssh/deploy_key_root_1696537420158 file ... 3243</p><p>✅ [SSH] key added to `.ssh` dir /home/runner/.ssh deploy_key_root_1696537420158</p><p>rsync version 3.1.3 protocol version 31</p><p>Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.</p><p>Web site: http://rsync.samba.org/</p><p>Capabilities:</p><p> 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,</p><p> socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,</p><p> append, ACLs, xattrs, iconv, symtimes, prealloc</p><p></p><p>rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you</p><p>are welcome to redistribute it under certain conditions. See the GNU</p><p>General Public Licence for details.</p><p>✅️ [CLI] Rsync exists</p><p>[Rsync] Starting Rsync Action: /home/runner/work/API-Service/API-Service/* to deployer@202.129.81.20:/opt/cicd_testing/api</p><p>[Rsync] excluding folders</p><p>Warning: Permanently added '[202.129.81.20]:22' (ECDSA) to the list of known hosts.</p><p></p><p>Permission denied, please try again.</p><p></p><p>Permission denied, please try again.</p><p></p><p>deployer@202.129.81.20: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).</p><p></p><p>rsync: connection unexpectedly closed (0 bytes received so far) [sender]</p><p>rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]</p><p></p><p>❌ [Rsync] error:</p><p>Error: rsync exited with code 255</p><p>rsync /home/runner/work/API-Service/API-Service/* deployer@202.129.81.20:/opt/cicd_testing/api --rsh "ssh -p 22 -i /home/runner/.ssh/deploy_key_root_1696537420158 -o StrictHostKeyChecking=no" --recursive --exclude= -rlgoDzvc -i</p><p> at ChildProcess.<anonymous> (/home/runner/work/_actions/easingthemes/ssh-deploy/main/dist/index.js:2:2603)</p><p> at ChildProcess.emit (node:events:513:28)</p><p> at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12) {</p><p> code: 255</p><p>}</p><p>❌ [Rsync] stderr:</p><p>Warning: Permanently added '[202.129.81.20]:22' (ECDSA) to the list of known hosts.</p><p>Permission denied, please try again.</p><p>Permission denied, please try again.</p><p>deployer@202.129.81.20: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).</p><p>rsync: connection unexpectedly closed (0 bytes received so far) [sender]</p><p>rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]</p><p></p><p>❌️ [Rsync] stdout:</p><p></p><p>❌ [Rsync] command:</p><p>================================================================</p><p>================================================================</p><p>Error: R] rsync exited with code 255</p><p></p><p>Warning: Permanently added '[202.129.81.20]:22' (ECDSA) to the list of known hosts.</p><p>Permission denied, please try again.</p><p>Permission denied, please try again.</p><p>deployer@202.129.81.20: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).</p><p>rsync: connection unexpectedly closed (0 bytes received so far) [sender]</p><p>rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3][/CODE]</p><p></p><p></p><p>මම යූස් කරපු SSH module එක</p><p><a href="https://github.com/easingthemes/ssh-deploy" target="_blank">https://github.com/easingthemes/ssh-deploy</a></p></blockquote><p></p>
[QUOTE="DevOps_Boy, post: 29258415, member: 584464"] මචන්. මම ඩිප්ලෝයිමන්ට් කරනවා github action වලින්. ගොඩක් aws servers. pem file තියන නිසා අවුලක් නෑ. ඒත් මට තව සර්වර් එකක් දුන්නා ඩෙප්ලොයිමන්ට් දාන්න. ඒක AWS නෙමෙයි තියෙන්නේ. dialog IDC එකේ virtual server එකක්. අනිත් aws servers වලට අවුලක් නෑ ගානට වැඩේ වෙනවා. ඒත් මේ සර්වර් එකට දාන්න බෑ Error එකක් එනවා. මම ඒක දන්නම් පහතින්. මම ඩිප්ලෝයි කරන්න යූස් කරන්නෙ github market place eken gaththu rsync module එකක්. මම ඒ සර්වර් එකේ අලුත් යූසර් කෙනෙක් හැදුවා deployer කියල.ඊටපස්සේ ඒ යූසර්ට ssh keys දැම්මා. මොකද මම යූස් කරන මොඩියුල් එකට අනිවා .PEM file එකක් දෙන්න ඔනේ. මට අලුතින් හම්බුන සර්වර් එක Password and username ගහලා ලොග් වෙන්න remote SSH කරන්න පුලුව්න්. ඒත් winscp කරන්න යද්දි server refesed our key කියලා එනවා. මම /etc/ssh/sshd_config file එකේ PubkeyAuthentication yes කරලා SSH restart කලා. හැබැයි අලුත් username and password වලින් ssh කරන්න පුලුවන් අවුලක් නැතුව. winscp එකෙනුයි github action එකෙනුයි තමා බැරි. chatGPT එකේ තිබ්බ ඒවත් try කලාට හරි ගියේ නෑ. මේකට මොකද්ද කරන්න පුලුව්න්????? මම remote server එකෙ private key generate කලේ මෙකෙන් - "ssh-keygen -m PEM -t rsa -b 4096" [B][I][SIZE=6]script[/SIZE][/I][/B]: [CODE=yaml]name: Deploy to WAR files to github AWS LightSail on: push: branches: main jobs: Get_code: runs-on: ubuntu-20.04 steps: - name: Get code uses: actions/checkout@v4 - name: Getting deatails of the server run: | lscpu free -h - name: Go to folder run: | cd /home/runner/work/API-Service/API-Service ls -l - name: Deploy to the Dialer server. uses: easingthemes/ssh-deploy@main with: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_TEST }} SOURCE: "*" REMOTE_HOST: "202.129.81.20" REMOTE_PORT: "22" REMOTE_USER: "deployer" TARGET: "/opt/cicd_testing/api"[/CODE][CODE][/CODE] [B][I][SIZE=6]error[/SIZE][/I]:[/B] [CODE]Run easingthemes/ssh-deploy@main with: SSH_PRIVATE_KEY: *** SOURCE: * REMOTE_HOST: 202.129.81.20 REMOTE_PORT: 22 REMOTE_USER: deployer TARGET: /opt/cicd_testing/api ARGS: -rlgoDzvc -i SSH_CMD_ARGS: -o StrictHostKeyChecking=no [DIR] Creating /home/runner/.ssh dir in workspace root ✅ [DIR] dir created. [FILE] writing /home/runner/.ssh/known_hosts file ... 0 ✅ [SSH] known_hosts file ensured /home/runner/.ssh ✅ [DIR] /home/runner/.ssh dir exist [FILE] writing /home/runner/.ssh/deploy_key_root_1696537420158 file ... 3243 ✅ [SSH] key added to `.ssh` dir /home/runner/.ssh deploy_key_root_1696537420158 rsync version 3.1.3 protocol version 31 Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append, ACLs, xattrs, iconv, symtimes, prealloc rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details. ✅️ [CLI] Rsync exists [Rsync] Starting Rsync Action: /home/runner/work/API-Service/API-Service/* to deployer@202.129.81.20:/opt/cicd_testing/api [Rsync] excluding folders Warning: Permanently added '[202.129.81.20]:22' (ECDSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. deployer@202.129.81.20: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3] ❌ [Rsync] error: Error: rsync exited with code 255 rsync /home/runner/work/API-Service/API-Service/* deployer@202.129.81.20:/opt/cicd_testing/api --rsh "ssh -p 22 -i /home/runner/.ssh/deploy_key_root_1696537420158 -o StrictHostKeyChecking=no" --recursive --exclude= -rlgoDzvc -i at ChildProcess.<anonymous> (/home/runner/work/_actions/easingthemes/ssh-deploy/main/dist/index.js:2:2603) at ChildProcess.emit (node:events:513:28) at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12) { code: 255 } ❌ [Rsync] stderr: Warning: Permanently added '[202.129.81.20]:22' (ECDSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. deployer@202.129.81.20: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3] ❌️ [Rsync] stdout: ❌ [Rsync] command: ================================================================ ================================================================ Error: R] rsync exited with code 255 Warning: Permanently added '[202.129.81.20]:22' (ECDSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. deployer@202.129.81.20: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3][/CODE] මම යූස් කරපු SSH module එක [URL]https://github.com/easingthemes/ssh-deploy[/URL] [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom