12-18-2009
The ssh command does care about double quotes, if it sees them. But cmd.exe doesn't build the arguments right. It doesn't even allow you to escape anything (as you tried) since the backslash is used as path separator.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
Eh... yeah. What the title says. :D (1 Reply)
Discussion started by: PSC
1 Replies
3. AIX
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
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
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
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
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
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
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
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
LEARN ABOUT PHP
addslashes
ADDSLASHES(3) 1 ADDSLASHES(3)
addslashes - Quote string with slashes
SYNOPSIS
string addslashes (string $str)
DESCRIPTION
Returns a string with backslashes before characters that need to be escaped. These characters are single quote ( '), double quote ( "),
backslash ( ) and NUL (the NULL byte).
An example use of addslashes(3) is when you're entering data into string that is evaluated by PHP. For example, O'Reilly is stored in
$str, you need to escape $str. (e.g. eval("echo '".addslashes($str)."';"); )
To escape database parameters, DBMS specific escape function (e.g. mysqli_real_escape_string(3) for MySQL or pg_escape_literal(3),
pg_escape_string(3) for PostgreSQL) should be used for security reasons. DBMSes have differect escape specification for identifiers (e.g.
Table name, field name) than parameters. Some DBMS such as PostgreSQL provides identifier escape function, pg_escape_identifier(3), but not
all DBMS provides identifier escape API. If this is the case, refer to your database system manual for proper escaping method.
If your DBMS doesn't have an escape function and the DBMS uses to escape special chars, you might be able to use this function only when
this escape method is adequate for your database. Please note that use of addslashes(3) for database parameter escaping can be cause of
security issues on most databases.
The PHP directive magic_quotes_gpc was on by default before PHP 5.4, and it essentially ran addslashes(3) on all GET, POST, and COOKIE
data. Do not use addslashes(3) on strings that have already been escaped with magic_quotes_gpc as you'll then do double escaping. The func-
tion get_magic_quotes_gpc(3) may come in handy for checking this.
PARAMETERS
o $str
- The string to be escaped.
RETURN VALUES
Returns the escaped string.
EXAMPLES
Example #1
An addslashes(3) example
<?php
$str = "Is your name O'Reilly?";
// Outputs: Is your name O'Reilly?
echo addslashes($str);
?>
SEE ALSO
stripcslashes(3), stripslashes(3), addcslashes(3), htmlspecialchars(3), quotemeta(3), get_magic_quotes_gpc(3).
PHP Documentation Group ADDSLASHES(3)