Sponsored Content
Top Forums Shell Programming and Scripting Using ssh to add register key on ssh server Post 302381302 by leaftree on Thursday 17th of December 2009 07:21:34 PM
Old 12-17-2009
Using ssh to add register key on ssh server

Hi,

I want to use ssh to add a register key on remote ssh server. Since there are space characters in my register key string, it always failed. If there is no space characters in the string, it worked fine. The following is what I have tried. It seems that "ssh" command doesn't care about double quotes, it just ignores them. Does anyone know how to make it work?

Thanks!

Code:
 C:\>ssh ADM_B REG ADD "HKLM\Software\My Co" /v
cat /t REG_SZ /d 100 /f
ERROR: Invalid syntax.
Type "REG ADD /?" for usage.

C:\>ssh ADM_B "REG ADD \"HKLM\Software\My Co\"
/v cat /t REG_SZ /d 100 /f"
ERROR: Invalid syntax.
Type "REG ADD /?" for usage.

C:\>ssh ADM_B REG ADD \'HKLM\Software\My Co\' /v
 cat /t REG_SZ /d 100 /f
ERROR: Invalid syntax.
Type "REG ADD /?" for usage.

C:\>ssh ADM_B REG ADD 'HKLM\Software\My Co' /v
cat /t REG_SZ /d 100 /f
ERROR: Invalid syntax.
Type "REG ADD /?" for usage.

C:\>ssh ADM_B REG ADD HKLM\Software\MyCo /v cat
 /t REG_SZ /d 100 /f
The operation completed successfully.


Last edited by Scott; 12-17-2009 at 08:27 PM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Add users on OSX server with SSH

Hi Is it possible to add users on a Mac OSX server from a unix system with ssh? If it is what file to alter? brg Nicke (3 Replies)
Discussion started by: nicke30
3 Replies

2. Cybersecurity

What's the difference between an SSH Client and an SSH Server?

Eh... yeah. What the title says. :D (1 Reply)
Discussion started by: PSC
1 Replies

3. AIX

key ssh

hello I want to connect from server1 to server2 (Aix 5.3) with ssh, without password prompt. So i define a ssh-key On server1: ssh-keygen -b 1024 -f identity -P '' -t dsa scp identity.pub toto@server2:/tmp/identity-.pub On server 2: cat identity-.pub >> .ssh/authorized_keys chmod 400... (2 Replies)
Discussion started by: pascalbout
2 Replies

4. Cybersecurity

SSH key code versus server key code

Hi, When logging in using SSH access (to a remotely hosted account), I received a prompt to accept a server's key fingerprint. Wrote that string of code down for comparision. Already emailed my host for their listing of the string of code for the server's key fingerprint (for comparison,... (1 Reply)
Discussion started by: Texan
1 Replies

5. AIX

SSH has this error: "server refused our key"

I did successful yestday as Porter's doc: 1. Create private/pub key on AIX: $ssh-keygen -t identity 2. Get my private key from the AIX server, found in $HOME/.ssh/identity Put that on Windows box. I use WinSCP to transfer private key from AIX to Windows 3. Run puttygen.exe and... (8 Replies)
Discussion started by: rainbow_bean
8 Replies

6. UNIX for Advanced & Expert Users

ssh key

Hi all, I have a sshkey which I use to connect from my unix box to a linux box without any issue...... however I downloaded this same key to my laptop and tried to connect to the same linux box but it failed..... As my laptop is running MS Vista I guessing I going have to convert it ...... (1 Reply)
Discussion started by: Zak
1 Replies

7. Shell Programming and Scripting

Generate Public Key when the server is not ssh enabled

I am writing a script that needs to access various servers some of which are not ssh enabled. In order to access the ssh enabled servers I am using the following command to generate the public key : ssh-keygen -t rsa Is there a similar command for the other servers as well. If I try to use... (1 Reply)
Discussion started by: ravneet123
1 Replies

8. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

9. Cybersecurity

get ssh key comment

Hey Guys, I have a server, and a technical user on it (only for reading logs). I set up openssh, and the user can login only with ssh key pair. Under this one technical user, there are a lots of public keys in the ~/.ssh/authorized_keys file. I would like to find out/log with which key the user... (3 Replies)
Discussion started by: lyynxxx
3 Replies

10. Shell Programming and Scripting

Need Help ssh key fail on remote server

Hello everyone, I need some help writing a bash script to: 1. ssh from a jumpserver to 50 remote servers logging in automatically using ssh keys and capture if zabbix is running by running a "ps -ef | grep zabbix" and output to a logfile capturing the server hostname and ps -ef output to... (2 Replies)
Discussion started by: vtowntechy
2 Replies
SSH-ASKPASS-FULLSCREEN(1)				      General Commands Manual					 SSH-ASKPASS-FULLSCREEN(1)

NAME
ssh-askpass-fullscreen - A simple replacement for ssh-askpass written with gtk2 SYNOPSIS
ssh-askpass-fullscreen DESCRIPTION
This manual page was written for the Debian distribution because the original program does not have a manual page. gnome-ssh-askpass is a GNOME-based passphrase dialog for use with OpenSSH. It is intended to be called by the ssh-add(1) program and not invoked directly. It allows ssh-add(1) to obtain a passphrase from a user, even if not connected to a terminal (assuming that an X display is available). This happens auto-matically in the case where ssh-add is invoked from one's ~/.xsession or as one of the GNOME startup pro- grams, for example. In order to be called automatically by ssh-add, ssh-askpass-fullscreen should be installed as /usr/bin/ssh-askpass ssh-askpass-fullscreen is a program that... ENVIRONMENT VARIABLES
The following environment variables are recognized: GNOME_SSH_ASKPASS_GRAB_SERVER Causes gnome-ssh-askpass to grab the X server before asking for a passphrase. GNOME_SSH_ASKPASS_GRAB_POINTER Causes gnome-ssh-askpass to grab the mouse pointer will be grabbed too. These may have some benefit to security if you don't trust your X server. Keyboard is always grabbed. SEE ALSO ssh-add(1), ssh-askpass(1). AUTHOR
This manual page was written by Marco Presi (Zufus) <zufus@debian.org>, for the Debian GNU/Linux system (but may be used by others) and it is based on that for x11-ssh-askpass by Philip Hands and the one for gnome-ssh-askpass by Colin Watson <cjwatson@debian.org> May 8 , 2004 SSH-ASKPASS-FULLSCREEN(1)
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy