ssh

automating ssh login: tcl expect interact comand behaves weird

I wanted to automate ssh logins. After some research, it seemed like tcl/expect was the route to go. However, my issue is that when interact takes over my terminal, stuff doesn't work as expected (pun not intended). For example, if I resize the terminal, it does not "take". Also, sometimes the interact is not responsive, and sometimes...

SSH Connection Java

Is it possible to make a ssh connection to a server with java? ...

Passing variables in remote ssh command

I want to be able to run a command from my machine using ssh and pass through the environment variable $BUILD_NUMBER Here's what I'm trying: ssh [email protected] '~/tools/run_pvt.pl $BUILD_NUMBER' $BUILD_NUMBER is set on the machine making the ssh call and since the variable doesn't exist on the remote host, it doesn't get picked up....

How to check programmatically the OS of remote host?

I need to check if remote host is Windows or Unix/Linux. I can't assume that it has web server configured. All I can do is to try to connect to several TCP or UDP services. Which TCP services (TCP port numbers) usually will be opened on Windows and not on Unix/Linux and vise versa? The other way is to try to ssh to it, and if it fails...

Issue with cloning from user to user on the same server!

I'm working deploying rails applications. I setup Gitosis on my server. Git user is up and I'm already have 'deploy' user on the server! I was 'git clone' to my local machine from the deploy user on the server. After setting up Gitosis, I'm also able to 'git clone' from the server(git user). What I want is to 'git clone' from 'git clon...

PHP connect via SSH tunnel to LDAP in other network

I'm developing website for my school. In that school we authenticate users via LDAP, so there was an idea to do the same via school-site. On that site everything is working perfectly, but during developing I need very often to test if such solution works, of not. In order not to commit my changes so often I want to test this site on my l...

Remotely Locking Gnome Screen Through SSH

How would you lock the screen of an active X session, through an SSH connection? My test platform is Ubuntu 10.04. The command "gnome-screensaver-command --lock" works when run from inside the X session, but fails from the SSH session, presumably because SSH doesn't have immediate access to X. Is there a workaround? ...

Problems using teamcity command line to perform ssh remote login

I was wondering if anyone has tried using teamcity's command line builder to perform ssh remote login. Right now, I would like to automate some testing on a QNX neutrino OS which is currently unsupported by teamcity. As a work around, I setup a ssh server on the target qnx machine so i could ssh and sftp the executables in. Firstly, t...

Using GVim on Windows to edit remote Linux files?

Is it possible to use gvim to edit remote Linux files if I am running Windows? To elaborate, I would like to connect to the Linux server via Putty and then use my local gvim instance to edit the files on the server -- Is this possible? It seems x11 forwarding (via xming?) might be the solution but I cannot get it to work. The remote s...

ssh is insisting on reading the password from the console rather than stdin.

This is what I'm doing: ssh_ = new Process(); ssh_.StartInfo.FileName = SshProvider; ssh_.StartInfo.Arguments = "-t -t " + Environment.UserName + "@" + serverName_; ssh_.StartInfo.UseShellExecute = false; ssh_.StartInfo.RedirectStandardInput = true; ssh_.StartInfo.RedirectStandardOutput = true; ssh_.StartInfo.RedirectStand...

how to ssh onto a host without password using java

Hi All Im currently using a java application to run commands on a unix box by invoking an instance of the bash as follows -- proc = Runtime.getRuntime().exec("/bin/bash", null, wd); and Im executing commands on the box by Printwriter as follows -- PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(proc.getO...

git clone requires ssh:// protocol when perhaps it shouldn't?

A colleague of mine has a remote git repo that I wanted to clone and he provided a url of [email protected]:443/repo.git. ssh is listing on port 443 in this case. I tried to clone by doing git clone [email protected]:443/repo.git but the operation times out. I had thought git defaults to ssh as its protocol and I'm not sure why th...

enabling tty in a ssh session

I would to take in some login information for a script have written in to be used by many users. In python I set the input_raw to read from dev/tty but it fails horribly when i am connecting to the script being run on a server through ssh. Thoughts? Workarounds? I would prefer to avoid hard coding usernames into the script. Please and...

git server side hooks

I am running into a problem when running the follow python script on the server looking for commit information for the push making sure it follows a particular syntax, I am unable to get input from the user which is why the username and password are hard coded. I am now also unable to get the list of commit message that occurred before t...

How to use sudo over SFTP with CyberDuck?

I'm copying this question from over here: http://getsatisfaction.com/cyberduck/topics/can_i_use_sudo_over_sftp_with_cyberduck I am having the same issue and finding it hard to find an answer: I am using Cyberduck over SFTP. I can connect and browse files fine, but when I try to upload, I get a permissions error. Web host says ...

How to get exit status with Ruby's Net::SSH library?

I have a snippet of code, simply trying to execute a script on a remote server, in the event that it fails, I'd like to make a follow-up call, imagine this: require 'rubygems' require 'net/ssh' require 'etc' server = 'localhost' Net::SSH.start(server, Etc.getlogin) do |ssh| puts (ssh.exec("true") ? 'Exit Success' : "Exit Failure") ...

Communicate via Cygwin SSH (in windows) from a C# app

I have written a C# program in Windows but instead of using the Granados C# SSH Lib (or similar library) to communicate to a client via SSH, is it possible for the C# program to use the SSH in cygwin to talk to the client directly? Thanks in advance ...

plink asking for login credentials when already argumented?

plink 12.34.567.89 -ssh -pw <hidden pass> -l <hidden username> svn update ~/public_html The ip addresss above is hidden/modified When I execute this, it asks: "login as: _" But I already supplied my login credentials in the plink command. I know my credentials are correct, I tested them with putty Thanks, Jonah ...

SSH doesnt exit from command line..

Hi, I ssh to another server and run a shell script like this nohup ./script.sh 1>/dev/null 2>&1 & Then type exit to exit from the server. However it just hangs. The server is Solaris. How can I exit properly without hanging?? Thanks. ...

Java and SSH: maintaining a connection.

Goal: Remote control ssh server with one connection and multiple sessions or one persistent session. Issue 1: I currently use sshj to do some remote control through SSH and it works well but I cant seem to get it to handle prompts correctly. (the host doesnt provide true root, just sudo -i so I need to log in first). Issue 2: I download...