From b62f8dac2a36998db5d3f0492d53a38d19becb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Tue, 14 May 2024 00:53:46 +0300 Subject: [PATCH] PTY allocation request failed on channel 0 with remote server runs Forgejo --- ssh-issue.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ssh-issue.md diff --git a/ssh-issue.md b/ssh-issue.md new file mode 100644 index 0000000..cdc4613 --- /dev/null +++ b/ssh-issue.md @@ -0,0 +1,40 @@ +# How to solve PTY allocation request failed on channel 0 issue for a remote server which runs Forgejo + +I have been uploaded my ssh key to remote virtual machine which runs Forgejo as same as the ssh public key on my physical machine. Then I tried to ssh to this virtual machine but I see this error output below : + +``` +hwpplayer1@hwpplayer1-Aspire-A315-24P:~$ ssh debian@192.168.122.171 +PTY allocation request failed on channel 0 + +Forgejo: Key check failed +Connection to 192.168.122.171 closed. +``` + +# Solution + +I removed the SSH key by openining the GUI interface Virt-Manager. Then I added my ssh key to the remote virtual machine written below: + +``` +ssh-copy-id debian@192.168.122.171 +``` + +In the meantime I configured my .ssh/config as written below for connecting remote server via + +``` +ssh hostname +``` + +``` +Host debian + Hostname 192.168.122.171 + User debian + IdentityFile ~/.ssh/id.rsa +``` + +now this command/ssh connection works ! + +``` +ssh debian +``` + +happy hacking !