Using WinSCP to add remote file to /etc/lirc

Hi all,
Long time ago I used WinSCP to put a modified copy of the samsung lircd.conf file on my RPi1.
Had to do this because updates were putting back to original and didn’t want the Power and Up/Down Vol buttons to do anything on the RPi.
Skip forward to now, using same RPi, I would like to put a new version of a samsung lirc file for my exact remote. I’m using a PC now that is all Linux but have Virtual Windows system and installed WinSCP.
I can log into the RPi with osmc user and password but can’t copy my new lircd.conf file to that folder. Can anyone help me or maybe give me info on how to put that file on the RPi1 so that I may select that in the GUI?

If your PC is running linux, why not just use rcp to copy the file instead of running windows in a VM?

However, because /etc is only writable by root you will have to do this in 2 stages. Copy the file to the osmc home and then ssh in and sudo to copy it to /etc.

You could enable root access via ssh, but that would be a really bad idea.

Didn’t work …
donald@Gateway-SX2110G ~ $ cd Downloads
donald@Gateway-SX2110G ~/Downloads $ ls
AA59-00600A-lircd.conf LibreELEC-RPi.arm-9.2.1.img.gz OSMC_TGT_rbp2_20200402.img
LibreELEC-RPi.arm-9.2.1.img LibreELEC.USB-SD.Creator.Linux-64bit.bin OSMC_TGT_rbp2_20200402.img.gz
donald@Gateway-SX2110G ~/Downloads $ rcp AA59-00600A-lircd.conf
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /home/donald/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/donald/.ssh/known_hosts:1
remove with:
ssh-keygen -f “/home/donald/.ssh/known_hosts” -R
ECDSA host key for has changed and you have requested strict checking.
Host key verification failed.
lost connection
donald@Gateway-SX2110G ~/Downloads $

Tried to remove as suggested “ssh-keygen -f “/home/donald/.ssh/known_hosts” -R”
and was asked for a password … used “osmc” but did not work.

Thanks for the reply. I couldn’t do it like you suggested but I did figure it out using this information.
I used WinSCP to copy the file to /home/osmc. That worked ok.
Then used Putty to copy the file to /etc/lirc
New samgsung lircd.conf file works as expected and now I can change it or added to new RPi when I upgrade RPi’s.

Did you change the default osmc password? If you didn’t and the password isn’t osmc then you have another problem. Have you opened any ports (like SSH) on your router?

Did not change default password. I can use Putty using osmc user and pw. Used ‘sudo’ to move the file from /home/osmc to /etc/lirc with out problem also.

Probably connecting to the wrong protocol/port.

I didn’t notice this, but that’s wrong. it should have been:

rcp AA59-00600A-lircd.conf osmc@

If you don’t want to always specify the user, create a file named config in your .ssh directory on system you are using with this:

 User osmc

Then you will be able to ssh/rcp without having to use osmc@.

The extra space before User is important!

Oh, thanks. The example I found just said “subdomain.domain” .
That might have worked then and would be faster than starting WinSCP. :wink: