ssh-copy-id script

Advertisement

henry3
Donor
Joined:
Posts:
24

ssh-copy-id script

When I use Tools > Install Public Key into Server command, I notice it checks to see if the key already exists. Do you download authorized_keys and check it locally, or call grep on the remote server? I wanted to add a new key to a list of servers, and did it using put -append, but that doesn't check if the key is already on that server. I didn't see a way to get the result code from a call, other than creating some type of flag.
Thanks,
Henry

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,694
Location:
Prague, Czechia

Re: ssh-copy-id script

The "Install Public Key into Server" uses pure SFTP, so it cannot do any "grep". It downloads and checks locally. I'll consider adding a command-line equivalent.

Reply with quote

henry3
Donor
Joined:
Posts:
24

Re: ssh-copy-id script

Thanks Martin
if I run
winscp.exe /log=log.txt /copyid user@host.com
I get:
Identity/key file was not specified.
and no logfile created
If I run it with
winscp.exe /copyid -i .ssh\id.pub user@host.com
it works. Is there a default .pub location?
Henry

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum