03-25-2008
Make also sure that that the key you've just copyed into authorized_keys is just in one line (notice the low underscore).
Check that public key authentication is allowed on the remote server. Have a look at your sshd_config file for that.
Regards.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
when i execute the below command
sftp -b ftpCommand.ksh remoteuser@remoterserver
i am getting the error "-b requires an argument greater than zero"
Please can any one help me. (1 Reply)
Discussion started by: vgs
1 Replies
2. Shell Programming and Scripting
Hi
when i execute the below command
sftp -b ftpCommand.ksh remoteuser@remoterserver
i am getting the error "-b requires an argument greater than zero"
Please can any one help me. (4 Replies)
Discussion started by: vgs
4 Replies
3. Shell Programming and Scripting
Thanks to the help from this forum i've learned a lot of good stuff but I still have questions :).
I need to write a script that checks if ssh to a box requires a password. I need it will be an "if" statement, if ssh requires password, then do a key exchange(with i already have). Just need to... (5 Replies)
Discussion started by: elbombillo
5 Replies
4. Shell Programming and Scripting
Hi team,
I know if we need to transfer the files between between 2 servser, we use SFTP through key setup between 2 server.
currently There are some problems and we are not able to setup keys between servers.
How can i use password with SFTP for temporary solutions, so that the file... (6 Replies)
Discussion started by: Amit.Sagpariya
6 Replies
5. Shell Programming and Scripting
Hi
i have generate public private key pair using command
ssh-keygen -t rsa -b 2048
and then it made the two keys under the directory
~/.ssh ( in server 1)
one is public key and another one is private ..
i copied public one key onto my second server under the directory
... (22 Replies)
Discussion started by: aishsimplesweet
22 Replies
6. Shell Programming and Scripting
Hi Guys,
I need to know how can i achieve SFTP "with" password in a shell script.
I have already done passwordless key generation thing and it is working but at the moment i am interested in passing a password.
And another question I have is say i have a.ksh and b.sh scripts...Can i invoke... (6 Replies)
Discussion started by: Arpit Narula
6 Replies
7. Red Hat
There are two servers :
1. Site
2. Testing
from site server i want to connect testing server with ssh password less authentication.
i generated public and private keys with ssh-keygen -t rsa on site server.
cat id_rsa >> authorized_keys
cat id_rsa.pub >> authorized_keys
i... (15 Replies)
Discussion started by: rehantayyab82
15 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup.
I am working on Solaris 10.
Here is the code.
#!/bin/ksh
# sample automatic Sftp script to dump a file
USER="user1"
PASSWORD="pass1"
HOST="host1"
sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies
9. Shell Programming and Scripting
I have been tasked with scripting a sftp transfer from my clients sftp server to a vendor. I have been given a user name and password. This is an older OEL server, 5.2. I am not able to install any packages on this system. It does not have expect, ssh-pass, or any other ssh password helper... (6 Replies)
Discussion started by: mtrgoose
6 Replies
LEARN ABOUT PHP
ssh2_sftp_mkdir
SSH2_SFTP_MKDIR(3) 1 SSH2_SFTP_MKDIR(3)
ssh2_sftp_mkdir - Create a directory
SYNOPSIS
bool ssh2_sftp_mkdir (resource $sftp, string $dirname, [int $mode = 0777], [bool $recursive = false])
DESCRIPTION
Creates a directory on the remote file server with permissions set to $mode.
This function is similar to using mkdir(3) with the ssh2.sftp:// wrapper.
PARAMETERS
o $sftp
- An SSH2 SFTP resource opened by ssh2_sftp(3).
o $dirname
- Path of the new directory.
o $mode
- Permissions on the new directory.
o $recursive
- If $recursive is TRUE any parent directories required for $dirname will be automatically created as well.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Creating a directory on a remote server
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
ssh2_sftp_mkdir($sftp, '/home/username/newdir');
/* Or: mkdir("ssh2.sftp://$sftp/home/username/newdir"); */
?>
SEE ALSO
mkdir(3), ssh2_sftp_rmdir(3).
PHP Documentation Group SSH2_SFTP_MKDIR(3)