toot.wales is one of the many independent Mastodon servers you can use to participate in the fediverse.
We are the Open Social network for Wales and the Welsh, at home and abroad! Y rhwydwaith cymdeithasol annibynnol i Gymru, wedi'i bweru gan Mastodon!

Administered by:

Server stats:

633
active users

Giles Goat

.. " .. I have two cassettes recorders ... " .. ( obscure reference ) .. no I have to computers, one runs Win11 .. one runs linux .. I have SCP on Win11 and sometime I need to copy files from Win11 into linux .. I made a very simple BATCH SCRIPT full of SCP ... .. etc. etc. .. It all works BUT any time I run it asks me for PWD for each SCP instance .. is any way to say "use this damned credentials" or something like --password = "banana" ??? ..

@gilesgoat You should be able to setup an SSH Public/Private key between the two machines and have scp use that. On linux you would probably run "ssh-keygen" followed by "ssh-copy-id $WINDOWS_IP" to generate a key and send it to Windows. The process might be the same on Windows but I've never tried it.

@gilesgoat If the account on linux is passwordless then you won't get a prompt for password when scp'ing. Same thing for ssh really

@gilesgoat there's sshpass for that:

sshpass -p "foobah" scp foo.txt foo@bah:/foo/bah/foo.txt