04-05-2017
Hi,
It might also be useful here to know what client you're actually using at your end if it's something other than command-line OpenSSH (product name and version if possible).
One possibility here might be that if you're using an unusual client that doesn't actually send any output to the remote end until an event occurs that necessitates it to be sent (like an end-of-line return, or needing immediate results from a tab complete, say) that time-outs are in fact the issue.
In this situation your session only looks like its alive because your client is really just doing local echos of your own keystrokes, and your apparent immediate disconnect on tab completion happens because in reality your session has already ended.
It's unlikely (to put it mildly), but hey, it's an outside possibility I suppose, if you're using an oddly-behaved client.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi, :)
When i press TAB key twice at $ prompt i am getting the following mesage
"Display all 3797 possibilities? (y or n)"
could u pls tell me the meaning of this message.
cheers
RRK (1 Reply)
Discussion started by: ravi raj kumar
1 Replies
2. Shell Programming and Scripting
Hi,
How do I execute/emulate the <Tab> keypress from within a script? Any pointers will be helpful.
Thanks (4 Replies)
Discussion started by: innocentspirit
4 Replies
3. Shell Programming and Scripting
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... (9 Replies)
Discussion started by: leaftree
9 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I want to use the TAB key to list directory (or go to directory or file).
For example,
dir1/dir2/file1
now if i do
$ cd /d and hit TAB it should go to 'dir1'.
Thanks (1 Reply)
Discussion started by: welldone
1 Replies
5. HP-UX
Hi,
I'm newbie with HP-UX. My Unix install with DB Oracle. In linux, when we type directory we don't need to type full. We can use Tab key. In Unix, i cannot use Tab key and i need to write whole directory. Other thing, how use Arrow key in Unix? I mean use command already i type.
Is it... (1 Reply)
Discussion started by: mzainal
1 Replies
6. 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
7. UNIX for Advanced & Expert Users
Hi everybody,
I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop.
I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies
8. Solaris
Hi,
On Solaris 10, how do I enable the auto tab key? For example, on the Linux, I can type few letters and press the tab key. How do I do the same on Solaris?
Thanks. (2 Replies)
Discussion started by: samnyc
2 Replies
9. Shell Programming and Scripting
Hi all,
I have a little problem with my shell script (reading user input, save user input to variable, invisible characters in the log file :()
printf "1. What's your file path?"
/path/to/my/file
read -e FILE
I have invisible characters in my log file (e.g. <ESC> or ^G) when I'm... (3 Replies)
Discussion started by: splendid
3 Replies
10. UNIX for Beginners Questions & Answers
I thought I had this figured out but was wrong so am humbly asking for help.
The task is to add an additional column to FILE 1 based on records in FILE 2.
The key is in COLUMN 1 for FILE 1 and in COLUMN 1 OR COLUMN 2 for FILE 2.
I want to add the third column from FILE 2 to the beginning of... (8 Replies)
Discussion started by: andmal
8 Replies
LEARN ABOUT PHP
ssh2_auth_pubkey_file
SSH2_AUTH_PUBKEY_FILE(3) 1 SSH2_AUTH_PUBKEY_FILE(3)
ssh2_auth_pubkey_file - Authenticate using a public key
SYNOPSIS
bool ssh2_auth_pubkey_file (resource $session, string $username, string $pubkeyfile, string $privkeyfile, [string $passphrase])
DESCRIPTION
Authenticate using a public key read from a file.
PARAMETERS
o $session
- An SSH connection link identifier, obtained from a call to ssh2_connect(3).
o $username
-
o $pubkeyfile
- The public key file needs to be in OpenSSH's format. It should look something like: ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8=
rsa-key-20121110
o $privkeyfile
-
o $passphrase
- If $privkeyfile is encrypted (which it should be), the $passphrase must be provided.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Authentication using a public key
<?php
$connection = ssh2_connect('shell.example.com', 22, array('hostkey'=>'ssh-rsa'));
if (ssh2_auth_pubkey_file($connection, 'username',
'/home/username/.ssh/id_rsa.pub',
'/home/username/.ssh/id_rsa', 'secret')) {
echo "Public Key Authentication Successful
";
} else {
die('Public Key Authentication Failed');
}
?>
NOTES
Note
The underlying libssh library doesn't support partial auths very cleanly That is, if you need to supply both a public key and a
password it will appear as if this function has failed. In this particular case a failure from this call may just mean that auth
hasn't been completed yet. You would need to ignore this failure and continue on and call ssh2_auth_password(3) in order to complete
authentication.
PHP Documentation Group SSH2_AUTH_PUBKEY_FILE(3)