ssh

How can I edit a file on EC2 directly from my localhost?

I have a batch script on an EC2 instance that I would like to be able to edit directly from my desktop's text editor. What is a good method of doing so easily? ...

Line-by-line Remote Data Transmission in Python

I've been playing with the subprocess module to iteratively send each line in an input file to a process created by the following command. ssh -t -A $host 'remote_command' The remote_command expects a line in its STDIN, does some processing on the line and iterates the cycle until STDIN closes or reaches EOF. To achieve this, what I'...

How can I use pem files in php's ssh2 functions

Hi, I need to connect to some Amazon EC2 instances through php's ssh2 functions to get some info and display it on my backoffice. Is there a way in ssh2 functions to do the same I do when connecting through the command line ssh? ssh -i path_to_file/key.pem host01-ec2 Thanks ...

Why does cygwin's svn ask for a password?

At work we have svn setup so that when I have an ssh tunnel open to the server I can access repositories from localhost without beeing prompted for a password. (The repositories are accessed via svn://localhost/ urls). Everything works fine with TortoiseSVN and windows command line svn, but I would like to use cygwin svn. The problem is ...

Automatically cd to a given remote path when connecting via ssh

I have a bunch of remote servers that I regularly connect to via ssh; which I've setup in my ~/.ssh/config file. I was wondering if it was possible to specify a remote path to cd to when I connect to some of these servers? For example, I may have something like this in my config file: Host testbox HostName 192.123.456.789 User root A...

How do I add a password to an OpenSSH private key that was generated without a password?

I generated an OpenSSH private key using puttygen (and exported it in OpenSSH format). How can I put a password on this existing key (I know how to generate a new key with a password)? Thanks! ...

paramiko combine stdout and stderr

I am trying to combine the output of stdout and stderr. My belief is that this can be done with the set_combine_stderr() of a Channel object. This is what I am doing: SSH = paramiko.SSHClient() #I connect and everything OK, then: chan = ssh.invoke_shell() chan.set_combine_stderr(True) chan.exec_command('python2.6 subir.py') resultado =...

SSH Variable not passing

Hello, I am having trouble making this work and am looking for some help. Currently i have a file dumped into my directory every day with the date as the file name (say "100928.zip") and I am trying to setup a cron job to unzip it but figured i'd test it first. Using OSX Terminal. This is what I am doing.... iDate='date +%y%m%d'; unz...

KDESvn 'Add ssh-identities to ssh-agent' doesnt work

i generated a pair of keys. i want kdesvn to remember it but when i click on 'Add ssh-identities to ssh-agent' it does nothing! i tried ssh-add id_dsa (id_dsa is my private key) but i guess it has nothing to do with the kdesvn. ...

strange ssh issues with github

Scenario 1. I am doing this from /home/deploy directory I am trying to set up ssh with github for capistrano deployment. this has been an absolute nightmare. when I do ssh [email protected] as the deploy account I get Permission denied (publickey). so may be the key is not being found, so If I do a ssh-add /home/deploy/.ssh/id_rsa Co...

Wget entire http directory that is password protected

I am trying to back up one of my sites that is password protected using wget. I can't seem to format the command correctly because I keep getting 401 errors: wget http://dev.example.com/"Login?mode=login > &user-username=TYPEUSERNAMEHERE&user-password=TYPEPASSWORDHERE" Can anyone tell me what I am doing wrong here? What is the correct...

How do I access my SSH public key?

I am exactly halfway down this page: http://help.github.com/msysgit-key-setup/ I've just generated my first ever RSA keypair and I now want to add that key to my Github account. Thing is, I don't see how to access the public key that I'm supposed to enter into Github's 'key' field. Entering cd id_rsa.pub and id_rsa.pub into Git Bash do...

Git, how to generate public key

Hi everyone, I am a newbie to Git/GitHub and would like to know how to generate a public key(to be used in GitHub) using Git Bash. The command below generates the error sh.exe": syntax error near unexpected token '(' I am using windows xp. $ ssh-keygen -t rsa -C "[email protected]" Generating public/private rsa key pair. Enter file ...

Check if passwordless access has been setup

Hello, I would test via a python script whether a passwordless ssh login has been setup or not. If i run the normal ssh command then it will wait to accept the password for some amount of time. Is there a way where the ssh command should return an error as soon as ssh asks for a password. Is it possible to achieve this? ...

linux command for extracting war file

i have centOS on my VPS and i upload myproject.war file to the tomcat application server (/webapp folder). how can i extract the .war file with linux command prompt? i'm using puTTy. ...

svn update on server using ssh terminal command

Hello, I'm new to subversion, and of course, ssh. I'm using Mac's 'versions' app, to 'commit' changes to a repository. From there, using my mac terminal, i've doing the following: ssh [email protected] it then prompts me for password, and i proceed by inputting pswrd once connected, i input: svn update /var/www/vhosts/server_n...

What is causing paramiko.SSHException: Invalid packet blocking?

When I attempt to connect to one of our internal servers using paramiko (inside of fabric, for what it's worth) I get this error: Retrieving packages from server p-websvr-004 [p-websvr-004] run: /usr/sbin/pkg_info -aD|grep "Information for" starting thread (client mode): 0x179f090L Banner: -----------------------------------------------...

Can't execute ssh from php

Hi Everyone, I can't seem to execute the ssh command from any of the PHP functions like exec, system, passthru etc.. I've even tried /bin/ssh however no output is displayed Any ideas? I can confirm that by doing "su - www-data" and then trying ssh works, meaning that the apache user has access to ssh.. Thanks Update: Sorry everythin...

error when exec'ing scp from python

hi, this code is giving following error: os.system("scp %s:/export/home/sample/backup.sql %s:/home/rushi/abc.sql" % (a, b)) Permission denied (publickey,keyboard-interactive). lost connection a and b are the command line arguments which accept user name and machine name as arguments: eg: [email protected] . ...

Git SSH setup Permission denied (publickey)

Hi, I'm using a VWWare image of Ubuntu 8.04 and experiencing problems while setting up git access over SSH I get the following output debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: debug1: Authentications that can continue: publickey debug1: Offering pub...