ssh

Can't get SFTP to work in PHP

I am writing a simple SFTP client in PHP because we have the need to programatically retrieve files via n remote servers. I am using the PECL SSH2 extension. I have run up against a road block, though. The documentation on php.net suggests that you can do this: $stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r'); However, I have...

MS Access VB call to Lib "kernel32" fails to stop a process

In the book SQL Hacks from O'Reilly, Hack 44 shows how to tunnel into MySQL from Microsoft Access. I can't get the code that stops the tunnel to work. This is the example code that starts the tunnel: Dim plink As Long Private Sub StartTunnel_Click( ) 'Run plink. Use Linux account details to establish tunnel. plink = Shell("c:\Docu...

Installing java on linux using ssh

Hi I want to install java on many computers using ssh so I want to write a bash script that will do (roughly): for c in computers do scp jre--.rpm $c ssh $c 'sudu -s; chmod a+x jre--.rpm ; ./jre--.rpm; echo "success!"' done The problem is that during the java installation I need to "read" the notice and type "yes" at the en...

Using pseudo tty with ssh results in warning

I am using ssh from my application and must pass "-t -t" to ssh in order for it to work correctly. Otherwise, the stdin of my application is interfered with by the call to ssh. Forcing a pseudo terminal to ssh via the -t -t avoids this issue, but instead results in the following obscure error message coming back from ssh, although the ...

Dependent Services in Windows

Hi Guys, So I am installing copSSH on my windows box and I keep getting this error related to "cant start service" - namely The description for Event ID ( 0 ) in Source ( copSSHD ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. Yo...

msysgit troubles

Hi, So I seem to have some real issues setting up msysgit. I can connect via putty to my SSH directory using ssh://user@host:port And I have the correct keys. I can also do this using plink via the plink -P PORT user@host -i /path/to/private_key.ppk When I attempt to run (via TortiseGIT) or via a git bash git clone ssh...

Access GIT via Cygwin but not via Git Bash ?

Hello I have installed msysgit - and I am trying to get it working. When I run a cygwin bash terminal - I can access my ssh via ssh user@host When I try the same via a Git Bash git ls-remote user@host/path/to/git I simply get a fatal: the remote end hung up Any ideas what to do ? ...

How can I get git and copSSH to look in the correct directory for keys?

I just installed copSSH for Windows. When I boot it up I get a directory C:\copSSH\home\Nick\.ssh which has my pub and private key it. When I access this directory via a Cygwin bash window using ssh user@host I get happily logged in. However, when I open a git bash window with git clone ssh://user@host it tries to access ...

How can I remotely log on to a machine, execute a script which sets up an environment, then accept user input?

Hello. I've been trying to figure out a way to do this for a few hours now, and am having no luck. I have a large environment file that I have saved as a ksh script. This script works perfect if I type . ./setEnv.sh However, what I'm trying to do is use either ssh or rsh to log on to a remote system, execute this script, then allow m...

Paster cannot stop daemon

I'm using the following command in my pylons app in an attempt to stop the daemon on the server: paster serve --daemon dev.ini stop This is the error I get: No PID file exists in paster.pid Could not stop daemon; aborting Wondering how I can stop this daemon so I can reload dev.ini. Thanks! ...

Git over ssh without Git being installed on server

I have full access to some folder on a remote Linux server over ssh and scp. I can upload and download files but not install apps. Now I want to put a git repository on this server. When I try to clone from an over scp copied repository I get the following error message: sgit-upload-pack: Command not found fatal: The remote end hung ...

Timeout when ssh command is executed from my Java program

I have a Java program which runs in Tomcat and which needs to execute several ssh and scp commands, as well as a few simple commands such as ls on the local machine. I am having trouble with my current approach in that I am getting a time out every time I execute an ssh command. I can run the ssh command on the command line with no pro...

How to send SIGINT to a remote process over SSH?

I have a program running on a remote machine which expects to receive SIGINT from the parent. That program needs to receive that signal to function correctly. Unfortunately, if I run that process remotely over SSH and send SIGINT, the ssh process itself traps and interrupts rather than forwarding the signal. Here's an example of this be...

How to connect to server via ssh but use native "Connect to Server" in OS X?

I have a remote server I manage via command line on Snow Leopard. I ssh into it, etc. All of my ssh keys are setup, and I have configured a local alias that lets me login with one command. What I'd also like to do is be able to connect to it via ssh, but have it mounted locally as a remote drive. I've tried the Connect to Server, comman...

NetBeans + Mercurial + SSH = Endless Pull/Push

I have well working Mercurial. I can push/pull through cmd commands. But in NetBeans push/pull lasts forever. I've tried to push to BitBucket over http and it worked. But the same thing over ssh didn't. And the same ssh push with 'hg push ssh://...' worked. What's wrong with NetBeans? It may be some option i should change or smth. ...

Empty PHP SSH2 stream contents, even with stream_set_blocking?

I am working on a tool that reads an iptables configuration from a remote host over SSH2 using the PECL SSH2 extension. I am able to successfully make the connection to the host, authenticate, and execute commands. The trouble I am having is sometimes the stream doesn't contain any data. /** * Load the current firewall configuration ...

Respond to shell prompts from Ant SSH task (SSHEXEC)

I'm using the SSHEXEC ant task to run an SSH script against a remote linux box. This has worked fine until I try and call a ksh script which prompts the user for input. The script changes the current user (like su). It prompts the user for a change_request_id, and a change_request_reason. So using this command normally in a shell wou...

Subversion with ssh for authentication

We have a Subversion server running on Linux. We have used to authenticate user with unencrypted password using passwd from conf folder for the subversion repository. We have tried to change to use ssh authentication. I am not sure how to use ssh to authenticate via subversion. Based on the subversion manual, if i use svn checkout s...

Permission denied (publickey,keyboard-interactive).

I tried to connect to planetlab node using ssh. It throws me error like Permission denied (publickey,keyboard-interactive). What does this mean? Here is the verbose of the exception. > OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL > 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config > debug1: Applying options for * debug...

SSH Private Key Permissions using Git GUI or ssh-keygen are too open

Recently I've been unable to clone or push to github, and I'm trying to find the root cause. This is on windows I have cygwin + git as well as msysgit. Msysgit was installed with the following options: OpenSSH Use Git from Windows Command Prompt That gives me 4 environments to try to use git in: Windows cmd prompt Powershell Git...