ssh

Install PECL SSH2 extension for PHP

I am trying to install this http://fr2.php.net/manual/en/book.ssh2.php on a Centos 5 (a fork of RHEL 5). I installed libssh2 (yum install libssh2) wich is located in /usr/lib, and when I install SSH2 extension (via pecl install -f ssh2) I get this message checking for ssh2 files in default path... not found configure: error: The r...

How can I tail a remote file?

I am trying to find a good way to tail a file on a remote host. This is on an internal network of Linux machines. The requirements are: Must be well behaved (no extra process laying around, or continuing output) Cannot require someone's pet Perl module. Can be invoked through Perl. If possible, doesn't require a custom built script o...

Running commands over ssh with Java

Scenerio: I'd like to run commands on remote machines from a Java program over ssh (I am using OpenSSH on my development machine). I'd also like to make the ssh connection by passing the password rather than setting up keys as I would with 'expect'. Problem: When trying to do the 'expect' like password login the Process that is create...

cygwin ssh no putty yes?

I generated a keys with putty w/ no passphrase. putty works fine, but now i installed cygwin and would like to use ssh to login. For some reason i'm prompted for a passphrase? why? putty just logs straight in? i don't want to have to generate a new key and piss off the network admins. here is what it looks like in cygwin: $ ssh -i Doc...

Changing the username for a Subversion commit over svn+ssh

I've run into an issue with our Subversion configuration here: I've checked out a project over svn+ssh on the local Linux system. So svn info reports something along the lines of: URL: svn+ssh://MYUSERNAME@server/svn/project/trunk/ Now my co-worker is unable to update the checked out working copy (It's on a live server) because the co...

Tips for using vim over a slow connection?

I'm using vim over a slow connection and it is a little painful. Is there anything I can do in vim to alleviate the pain? ...

SSH to debian server instantly logs out

I'm trying to help someone with their Debian server. They have Plesk. I made myself an user with Plesk and enabled SSH access. I can log on ... but only for one second. I see the MOTD, I see a Debian disclaimer, then I'm logged out again. "Connection closed". The only thing I could think to try is to change the shell settings, Plesk h...

How do I run a php script through SSH?

I have a rather long php script and whenever my internet connection skips out for a second the browser seems to stop the script. I can't sit around for 8 hours for my script to run so I figured I could just run it via ssh and be come back the next day and get my output file. However simple typing the scripts name into ssh doesn't seem ...

How to share a Putty session with someone else?

I'm looking for something like VNC for a command line interface. Specifically, I'd like to be able to share an ssh session (say via Putty) with someone else, working from another office across the country. We'd both be able to type things into the console, and see what the other one's doing (including more complex things things like vim ...

svn/ssh question in windows

I am trying to do a command line svn update on my windows machine (to use in a batch file), and I want it to emulate what my settings are in the Tortoise SVN GUI. In the tortoise settings, we have to specify the following in the SSH client... C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -l usernamehere -pw mypassword -i C:\Users...

SSH Library for creating SSH connections in C#

Is there a commercial or free (preferably) library for a .NET language that I can use with C# to make SSH connections? I'm trying to run a windows implementation of rsync that doesn't support ssh (yet) through it. ...

Restricting OpenSSH to allow uploads only to certain directories.

I need to run backups from multiple servers to a single account on another server. If one of the public servers is compromised, I don't want the other server's files on the backup account compromised. What I need to do is only allow SCP to a specific directory, based on the ssh key of the incoming connections. I know that I can set the...

How can I ssh directly to a particular directory?

I often have to login to one of several servers and go to one of several directories on those machines. Currently I do something of this sort: localhost ~]$ ssh somehost Welcome to somehost! somehost ~]$ cd /some/directory/somewhere/named/Foo somehost Foo]$ I have scripts that can determine which host and which directory I need t...

svn+ssh with putty session, not working in cygwin

So I access my SVN repo using the good ol' putty session name trick. I can use TortoiseSVN and Subclipse just fine, the URL format looks like: svn+ssh://@/data/svn/my-code Example: svn+ssh://codecraig@dev-server/data/svn/my-code So, I've checked out "my-code" to C:\my-code, now I am trying to use cygwin to check-in some changes. I o...

SVN Export from ASP.NET web app with ssh?

I have a setup where I want to deploy a website from our SVN repository to our staging server. In order to do this today I log in to the staging server (W2k machine) via remote desktop and run the following batch script: set SVN_SSH=plink.exe -i privatekey.ppk -l webstaging svn export --force svn+ssh://[email protected]/t...

Read header data from files on remote server

Hi! I'm working on a project right now where I need to read header data from files on remote servers. I'm talking about many and large files so I cant read whole files, but just the header data I need. The only solution I have is to mount the remote server with fuse and then read the header from the files as if they where on my local c...

Approaches to manage files on remote *NIX sever from Windows client applications

My Windows client application (written in C#) works with the remote MySQL database deployed on *NIX server. I'm going to add the ability to store files on the server. I was never fond of storing files in DB, so the files will be stored in the file system. The application will need to upload, download, and delete files from server. Any ...

SCP for C#

Is there a library that provides the ability to do SCP transfers in C#? ...

scp file not setting correct owner

Does SCP have a problem setting file permissions or have I misconfiguration my server? Updated (19/Mar/09): Actually: There is no problem - I have just misunderstood the way permissions work - they don't change when the file contents are changed Use case: There is a file on a server that I want to edit called "importantFile.txt". The ...

SSH Public Key for user without home directory

I'm running a Mac OS X Leopard Server and I created a new user without designating a home directory for that user. Is it possible to have that user authenticate using a Public Key? I know that when a user does have a home directory it goes in to ~/.ssh/authorized_keys I don't want to create a home directory for this user because my und...