Forum
[PROBLEM] Where is my SSH private key so i can use it to login Xbian via FileZilla? - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: [PROBLEM] Where is my SSH private key so i can use it to login Xbian via FileZilla? (/thread-4167.html)



Where is my SSH private key so i can use it to login Xbian via FileZilla? - postcd - 20th Apr, 2023 04:52 AM

Hello,

I have successfully setup password-less SSH access from my Debian user PC to Xbian root account PC (using ssh-keygen and ssh-copy-id), but when i want to do the same for FileZilla manager (in order to connect Xbian server), it wants path to PEM or PPK file, yet some tutorials says it can accept OpenSSH priv. key file and convert it. So i am trying to find the location of such file on Xbian (since i have SSH password less access already it should be somewhere?). Where it is please?

Quote:root@xbian ~ # ls -A1 /etc/ssh /root/.ssh
/etc/ssh:
moduli
ssh_config
ssh_config.d
sshd_config
sshd_config.d
ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub

/root/.ssh:
authorized_keys
known_hosts

root@xbian ~ # find / -name id_*
/usr/share/perl5/DateTime/Locale/id_ID.pod
/usr/share/i18n/locales/id_ID
/etc/request-key.d/id_resolver.conf

root@xbian ~ # grep -v "#" /etc/ssh/sshd_config|grep .
Include /etc/ssh/sshd_config.d/*.conf
PermitRootLogin prohibit-password
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server

UPDATE: !!!!!!!
I have found that i need to enter private key of local computer, not one of a remote Xbian server. So i entered /home/myusername/.ssh/id_rsa (had it there already because ran ssh-keygen in the past)


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - gkusiak - 21st Apr, 2023 03:05 AM

My -possibly incorrect- understanding of FileZilla is that you need the manager software on the "server"...which would imply client software on your xbian machine.
Samba has been part of kodi for...ever, or close to it IIRC. there are also addons for kodi that let you watch from various sources, including NAS/similar (Plex? emby? Jellyfin?)

I seem to think you may be making your life more difficult than it needs to be - I'd say that things are probably already in place for what you're hoping to accomplish. I've embraced the "everything is available" mindset and subscribed to RealDebrid- why pay for local storage when you can basically watch anything anytime from somebody else's cloud?


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - postcd - 21st Apr, 2023 03:30 AM

I do not think You have understood my aim. It is to use SFTP (SSH) to conveniently browse and download files from Xbian using GUI app (FileZilla). Xbian does not need any special software for FileZilla to work. SSH is sufficing. Only issue is where is that private key data, as i have asked.


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - grandcanyon - 26th Apr, 2023 01:46 PM

In FileZilla Pro->Settings.. select Connection->SFTP
Press the Add key file… button
Press Command-Shift-G to bring up a path selection window and type “~/.ssh”
Select the “id_rsa” key file or the name of the file you are using and click Open (this imports the key)
Click OK to close the Settings dialog
Open File->Site Manager…
Select the site with which you want to use the key
Choose Protocol “SFTP” and select Logon Type “Normal”. Don’t worry about a password if you key file doesn’t have a password, if it has one set it here.
Click Connect and you’ll see your files


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - postcd - 28th Apr, 2023 12:59 AM

(26th Apr, 2023 01:46 PM)grandcanyon Wrote:  Select the “id_rsa” key file or the name of the file you are using and click Open (this imports the key)

I know, but where do i get it on Xbian as i described in my OP, it was not found even i am using key-based access currently and "PermitRootLogin prohibit-password" in sshd_config.

Found solution: because i do not know how SSH keys exactly works, i thought that i needed to enter private key of the remote server (Xbian) to which FileZilla is connecting, but instead it accepted my local key /home/myusername/.ssh/id_rsa


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - felixandrea - 17th Sep, 2024 09:21 PM

Yes, to connect to Xbian via FileZilla you need to use a private key from your computer, not from the Xbian server. Typically the private key will be in your user's ~/.ssh/ directory on your computer, for example /home/myusername/.ssh/id_rsa. You just need to specify this path in FileZilla to make a passwordless SSH connection. Good luck! rice purity test


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - artestuarine - 23rd Sep, 2024 06:56 PM

To use your SSH private key to log into Xbian via FileZilla, you first need to locate the SSH private key on your system. The location of your SSH private key depends on the operating system you're using.


RE: Where is my SSH private key so i can use it to login Xbian via FileZilla? - stripechange - 25th Sep, 2024 07:51 PM

The file you're looking for is not necessarily a PEM or PPK file, but rather an OpenSSH private key file, which is typically named id_rsa or id_ed25519.

By default, the OpenSSH private key file is stored in the ~/.ssh directory of the user account that generated the key. In your case, since you have SSH passwordless access to the Xbian root account, you can assume that the private key file is stored in /root/.ssh on the Xbian machine.

However, it's not actually there! The reason is that id_rsa and id_ed25519 files are usually generated by ssh-keygen and are not stored in the default locations. Instead, they are generated in a temporary directory and then moved to the ~/.ssh directory.

To find the location of your private key file, you can try the following:

Run ssh-keygen -L -f /root/.ssh/id_rsa (or id_ed25519) on the Xbian machine. This will list the files that are referenced by the key. If you find a file with a name like id_rsa or id_ed25519, that's likely your private key file.
Run find /root -name id_rsa (or id_ed25519) on the Xbian machine to search for files with those names recursively. moto x3m
Check your ~/.ssh directory on your Debian user PC to see if you have a copy of the private key file there. If you do, you can use it to connect to Xbian using FileZilla.
Once you find the location of your private key file, you can use it in FileZilla by selecting "OpenSSH Private Key" as the authentication method and specifying the path to the file.