ssh

How can I pipe data to a process started via Net::SSH on stdin?

I'm generating a data feed on the local machine, that I want to pipe into a remote process via Net::SSH. Something like echo foosball | sed 's/foo/bar/g' Just that the echo foosball part would be the data feed on the local machine. What I'm NOT looking for is: data = "foosball" ssh.exec!("echo #{data} | sed 's/foo/bar/g'") I real...

Open local text application to edit remote text file using ssh?

So i am in a VPS terminal using ssh. In normal case I could just run locally mate <file> and it fires up TextMate with that file. Is it possible to use the same command and somehow open the local TextMate application but editing the remote file? That would be good if you are working in VPS and don't want to use vim all the time. ...

Xcode svn+ssh custom port not working?

So we used to use port 22 for our svn repository, but port 22 was recently closed by the firewall administrator, which forced us to use a different port. Anyway, it seems like Xcode doesn't play very well with custom port numbers, because as soon as you change the port number to anything, even 22, you get the following error message: ...

programmatically setting up eucalyptus node controller keys

Hello, I had a general question regarding the way eucalyptus setups ssh keypairs for the various controllers like cluster, node etc. Currently my task at hand is to automate setup of eucalyptus (including ssh'ing into machines and settuping up cluster controller and node controllers). If i have to do this programmatically, i need somehow...

Can't seem to connect with PuTTY

generated the required .ppk file and loaded it in Connection=>SSH=>Auth=>Private key file for authentication. The connection ERROR message: Network Error: Connection refused. Am i doing something wrong ? ...

OpenSSH Two Phase Login

I would like it if when I use OpenSSH like so: ssh user@host that it asks for a passphrase Please enter Passphrase: then asks for the password Please enter Password: Is this possible? ...

Issue with OleDbConnection.Open when Running as a Service

We have an Nant build script that we are running through SSH (Cygwin & Open SSH) to remotely upgrade our databases. When the Nant script is launched through an SSH session, the following error is thrown when it attempts to make a database connection. However, if I log in to the server directly (using the same account as the service) an...

SSH Connect to Mac using iPhone SDK for Remote Login

I wonder if anyone has succeeded in connecting to a Mac using an iOS Device via SSH (Remote Login) to access terminal and execute commands. I know that this is definietly possible as the Mobile Terminal App accomplishes this perfectly. I am trying to implement this connection in an iOS4 Application. Does anybody know the code to do this?...

ssh tunnel to a computer and create another tunnel a third server

I need to do some work on a server to which I don't have direct access to. I do have access to my company network (via vpn). If I were on that network, I could access the server directly. But, for some reason when I'm on the vpn, I can't access the server directly. So, I need to ssh into an intermediary ubuntu box, and then create an...

Android: Logging on to SSH server for internet access

Hi guys, At my campus, to get internet connection, I need to log on to a SSH server like they write: ...you must manually log in to the firewall server, by establishing a pseudo-tty-less ssh connection to it. The following command can be used on most systems: ssh -T -l [username] [server-URL] I must be logged on to the server for a...

Is it possible to switch the user on a git repo?

We have a staging server that we use git to manage very simply: develop locally, git commit/push, and then git pull on the server. I'd love to be able to switch user on the server's copy so I could run the git pull rather than the person who set up the environment. Any idea if this is possible? ...

Pexpect - silence ssh connection output

Hi. I'm using a simple pexpect script to ssh to a remote machine and grab a value returned by a command. Is there any way, pexpect or sshwise I can use to ignore the unix greeting? That is, from child = pexpect.spawn('/usr/bin/ssh %s@%s' % (rem_user, host)) child.expect('[pP]assword: ', timeout=5) child.sendline(spass) ...

Eucalyptus: getting private key from key pair through API / or injecting custom public key to instance

I'm probably having the most simple problem, but I'm still a bit at my wits end. Basically my problems are related to this command: euca-run-instances -k mykey emi-104915A8 As you know, when starting up instance in Eucalyptus, either through API (as I actually am) or with the command above, the key pair has to be created. If I have und...

svn+ssh commit error

###CLOSED: It was server issue. Hello, I have problem with commiting from my development env (Eclipse Helios + Subversive 0.7.9 + SVNKit 1.3.2) to my svn+ssh repository. After commiting files I eclipse dialog window ("Operation failed") appears with information "Commit operation failed 2 errors occured during the operation execution....

How to connect to remote MySQL server via SSH using JPA?

Hello, I'm trying to connect to remote MySQL server via SSH in my Java project. How can I integrate SSH connection with JPA? I'm using Netbeans 6.9.1, JPA, MySQL 5.2. Thanks ...

How can I create SSH public/private key pairs in ruby and store them in the Db.

I'm writing a ruby on rails service that will conect to various servers via SSH. I want to generate the public/rivate key and store them in the database. Then the user will be able to view the public key and add it to there key authentication for SSH on their server. The my service will contact the servers via Net::SSH and present the ...

Process dies after Jsch exits

I have a shell script that starts tomcat using 'catalina.sh start'. This script runs fine and starts tomcat which stays up even if I exit from my ssh session. I am trying to invoke this script from Jsch shell = new JSch(); session = shell.getSession(user, host, SSH_DEFAULT_PORT); session.setConfig(config); session.setPassword(password)...

tail file - count number of lines with a given pattern

Hi. I need to guarantee that a specific string is appearing in an active log file, meaning an operation is alive (feeding this count to a Trigger). Considering I'll do this remotely, I can't go with 'tail -f filename' else it would follow the file indefinitely, thus I'm thinking about grabbing a bunch of last written lines and countin...

How to ping XP machine from MacOSX

On my home network, I am able to ping between my XP machines just fine. I can also ping my Mac from the XP machines. However when I attempt to ping my XP machines from the OSX terminal I get 'unknown host' even when I add .local to the machine name. Pinging works if I use the IP address of the XP machine. Some background...I am attem...

Can I use a heredoc to enter a password in bash?

I know about RSA authentication, but for my purposes I want to use a heredoc to specify the password. I want something like the following, but I can't get it to work. Is this even possible? #!/bin/bash echo -n "Enter Password: " read -s password ssh myhost << EOL $password echo "I'm logged onto myhost" EOL echo done This is what I g...