ssh

HowTo: Teamcity + GitHub

Has anybody successfully configured Teamcity to monitor, extract, and build from GitHub? I can seem to figure how where and how to configure the SSH keys for Teamcity. I have Teamcity running as a system service, under a system account. So where does Teamcity stash its SSH configuration? EDIT To get this to work, I needed to stop th...

Unable to download data from my server fast in terminal

I run unsuccessfully curl $Masi@host:~/folder curl: (6) Couldn't resolve host 'host:~' I have SSH-keys to the host. I am trying to use curl similarly as scp. How can you use curl to download private data fast? ...

.bashrc at ssh login

When I ssh into my ubuntu-box running Hardy 8.04, the environment variables in my .bashrc are not set. If I do a source .bashrc, the variables are properly set, and all is well. How come .bashrc isn't run at login? ...

Text editor for editing files over ssh

I can't find any free programmer-oriented text editor that would run on windows and would edit remote files over ssh(sfpt). Any suggestions? ...

How to allow file uploading outside home directory with SSH?

I'm running a Fedora 8 Core server. SSH is enabled and I can login with Transmit (FTP client) on port 22. When logged in, I can successfully upload files to the users home directory. Outside the home directory I can only browse files, not upload/change anything. How can I allow file uploading to a specific directory outside the users hom...

Validating SSH Credentials in Java on Unix

I have a text file on a unix machine containing the SSH user name and password that someone might use to connect to it. How do I verify that the user name and password are valid using Java? Do I try to SSH connect to the same machine by using Runtime.exec()? I can grep for the user /etc/passwd. But, the password is shadowed. I'd a...

Why are lowercase characters in CentOS rendering as blocks?

Hi there, I've been checking up on who's been signing up for one of my websites by using the brute-force SELECT * FROM tblUsers; I hash user passwords, so they don't render as cleartext, and I noticed a strange artifact upon the display of one of them. It's difficult to explain in words, so here's the text of a recent session: mysql> ...

SSH Windows to UNIX

I built a batch file from my windows machine that connects to a UNIX server. I Then want commands to execute in UNIX from the batch file. UNIX doesn't seem to recognize my commands after I am logged into the server. This is what I coded: ssh SERVERNAME exit Right now, I am just trying to make it log in and exit. I get logged into the s...

Passwords in Emacs tramp mode editing

I'm using emacs tramp mode to remotely edit files over ssh. The problem is that every time I save the file I'm editing I have to enter my user password. I find that very annoying. How can I write my password only once / editing session? ...

ssh -D <port> <[email protected]>; but in reverse?

Is it possible to set up an SSH tunnel with dynamic port forwarding like this: ssh -D [email protected] but do it the other way around? That's to say I want to initiate the connection on my local machine and have the dynamic port forwarding happen there, and have my friend connect his browser to the other end of the tunnel. The abo...

Check whether a path exists on a remote host using paramiko

Paramiko's SFTPClient apparently does not have an exists method. This is my current implementation: def rexists(sftp, path): """os.path.exists for paramiko's SCP object """ try: sftp.stat(path) except IOError, e: if 'No such file' in str(e): return False raise else: return ...

Can I SSH to MySQL with the GUI tools?

I have a ubuntu server which I've locked down to only HTTP, HTTPS and SSH (port 30000). On this box I have a MySQL server which 99.9% of the time is only used locally. Every now and then I want to connect to the MySQL instance with the GUI tools, but without touching the firewall. Therefore, it is possible to set things up so that I c...

Why ssh fails from crontab but succedes when executed from a command line?

I have a bash script that does ssh to a remote machine and executes a command there, like: ssh -nxv user@remotehost echo "hello world" When I execute the command from a command line it works fine, but it fails when is being executed as a part of crontab (errorcode=255 - cannot establish SSH connection). Details: ... Waiting for serve...

How do I display progress bars from a shell command over ssh.

I've got a script thats supposed to mimic ffmpeg on my local machine, by sending the command of to a remote machine, running it there and then returning the results. (see previous stack*overflow*** question.) #!/usr/bin/env ruby require 'rubygems' require 'net/ssh' require 'net/sftp' require 'highline/import' file = ARGV[ ARGV.index(...

How to ignore hostname in SSH tunnel

Here is a trivia question for any ssh/ssl experts. In our corporate office we have a JMS app (Tibco EMS) running on a server behind a firewall which blocks most ports. I can ssh into this server but can not send messages to the JMS app because the port isn't open. So using putty I created an ssh tunnel to the server so that instead of s...

ssh hangs with high latency connection (connecting internationally)

This is been making my programming really frustrating lately. I´m in Argentina right now connecting to a U.S. server via SSH. Understandably, the pings are a bit higher here (around 200ms on average) so when I SSH into the server there is a slightly noticeable lag between each keystroke. This is fine and easy enough to work with. Wha...

How to capture your username on Box A after you have ssh’d onto Box B?

Hi, Maybe not the best worded question, but hopefully it's a straightforward problem. The scenario is ssh'ing from a personal account on box A to a generic account on box B. The script running on box B needs to capture the personal account name for logging purposes. Is there any way of capturing this, either via ssh itself or some in...

bash script to ssh into a box and get me to a python shell

I want to write a script that will get me straight to a python shell on another box so that i don't have to first run ssh and second run python. When I do "ssh hostname python" it just hangs - it's something to do with the fact that python is interactive. "ssh hostname cat x" works fine. Is there some ssh option that will make this wor...

Python shell: Arrow keys do not work on remote machine

In shells like the interactive python shell, you can usually use the arrow keys to move around in the current line or get previous commands (with arrow-up) etc. But after I ssh into another machine and start python there, I get sessions like: >>> import os >>> ^[[A where the last character comes from arrow-up. Or, using arrow-left: ...

How to secure an admin area for a public and private rails app

How would you secure access to the admin area for a web app? Our Rails CMS serves pages publicly. I would like to make the backend (/admin) inaccessible using either the webserver(apache) or firewall(netfilter). Could this be done using an SSL certificate? I would like to limit access to the backend to only those whose have the "key"...