Все вопросы: [ssh]

274 вопросов

37
голосов
5ответов
88422 просмотров

Read a file from server with SSH using Python

I am trying to read a file from a server using SSH from Python. I am using Paramiko to connect. I can connect to the server and run a command like cat filename and get the data back from the server but some files I am trying to read are around 1 GB or more in size. How can I read the file on the...

197
голосов
14ответов
293417 просмотров

Configuring Git over SSH to login once

I have cloned my git repository over ssh. So, each time I communicate with the origin master by pushing or pulling, I have to reenter my password. How can I configure git so that I do not need to enter my password multiple times?

5
голосов
3ответов
8691 просмотров

iPhone interaction between PC app and iPhone app using USB

I know since the 3.0 SDK we can use accessories, so my question is simple, what is the process to make an iPhone app and PC (or Mac) app interact, using the USB ? I don't ask you any code, but just the paths and the keys for making that work. Have I to access the iPhone disk through SSH and wor...

1
голосов
1ответов
716 просмотров

how do i source .bashrc remotely

I'm currently writing a script to set some PATH in a remote machine using ssh. I have successfully set the variables in the .bashrc. However, it the last step of my script is "source .bashrc". However, when i ssh to the machine manually, the PATH is still not set. What is the problem?

1
голосов
1ответов
650 просмотров

Why does write() to pipe exit program when pipe writes to stdout?

I have a server application that writes to a popen("myCommand", "w") file descriptor in a separate thread and if the command passed to popen() results in any output to stdout or stderr, the my application exits. However, this is only an issue when my server application was invoked via inetd, if ...

37
голосов
2ответов
52790 просмотров

How to run an X program from outside the X session (e.g. from the console or SSH)

Without being the person logged in at the console, how do I run an X application and have it display on that X session? Assume I am either root, or I am the same user who logged in, so in principle I have persmission to do this. But how do I convince X of this? Some examples of situations like t...

6
голосов
2ответов
8131 просмотров

Example code of libssh2 being used for port forwarding

I'm looking for an example of how to use libssh2 to setup ssh port forwarding. I've looked at the API, but there is very little in the way of documentation in the area of port forwarding. For instance, when using PuTTY's plink there is the remote port to listen on, but also the local port that ...

5
голосов
2ответов
26262 просмотров

SSH / SFTP connection issue using Tamir.SharpSsh

This is my code to connect and send a file to a remote SFTP server. public static void SendDocument(string fileName, string host, string remoteFile, string user, string password) { Scp scp = new Scp(); scp.OnConnecting += new FileTansferEvent(scp_OnCo...

245
голосов
25ответов
261352 просмотров

SSH Private Key Permissions using Git GUI or ssh-keygen are too open

Recently I've been unable to clone or push to github, and I'm trying to find the root cause. This is on windows I have cygwin + git as well as msysgit. Msysgit was installed with the following options: OpenSSH Use Git from Windows Command Prompt That gives me 4 environments to try to use g...

52
голосов
3ответов
282497 просмотров

Permission denied (publickey,keyboard-interactive)

I tried to connect to planetlab node using ssh. It throws me error like Permission denied (publickey,keyboard-interactive). What does this mean? Here is the verbose of the exception. > OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL > 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/s...

5
голосов
2ответов
6899 просмотров

Subversion with ssh for authentication

We have a Subversion server running on Linux. We have used to authenticate user with unencrypted password using passwd from conf folder for the subversion repository. We have tried to change to use ssh authentication. I am not sure how to use ssh to authenticate via subversion. Based on the su...

1
голосов
1ответов
2751 просмотров

Respond to shell prompts from Ant SSH task (SSHEXEC)

I'm using the SSHEXEC ant task to run an SSH script against a remote linux box. This has worked fine until I try and call a ksh script which prompts the user for input. The script changes the current user (like su). It prompts the user for a change_request_id, and a change_request_reason. So ...

1
голосов
3ответов
2328 просмотров

Empty PHP SSH2 stream contents, even with stream_set_blocking?

I am working on a tool that reads an iptables configuration from a remote host over SSH2 using the PECL SSH2 extension. I am able to successfully make the connection to the host, authenticate, and execute commands. The trouble I am having is sometimes the stream doesn't contain any data. /** ...

0
голосов
1ответов
1492 просмотров

NetBeans + Mercurial + SSH = Endless Pull/Push

I have well working Mercurial. I can push/pull through cmd commands. But in NetBeans push/pull lasts forever. I've tried to push to BitBucket over http and it worked. But the same thing over ssh didn't. And the same ssh push with 'hg push ssh://...' worked. What's wrong with NetBeans? It may be ...

1
голосов
1ответов
2397 просмотров

How to connect to server via ssh but use native "Connect to Server" in OS X?

I have a remote server I manage via command line on Snow Leopard. I ssh into it, etc. All of my ssh keys are setup, and I have configured a local alias that lets me login with one command. What I'd also like to do is be able to connect to it via ssh, but have it mounted locally as a remote drive....

14
голосов
4ответов
14636 просмотров

How to send SIGINT to a remote process over SSH?

I have a program running on a remote machine which expects to receive SIGINT from the parent. That program needs to receive that signal to function correctly. Unfortunately, if I run that process remotely over SSH and send SIGINT, the ssh process itself traps and interrupts rather than forwarding...

3
голосов
4ответов
10460 просмотров

Timeout when ssh command is executed from my Java program

I have a Java program which runs in Tomcat and which needs to execute several ssh and scp commands, as well as a few simple commands such as ls on the local machine. I am having trouble with my current approach in that I am getting a time out every time I execute an ssh command. I can run the s...

9
голосов
3ответов
2177 просмотров

Git over ssh without Git being installed on server

I have full access to some folder on a remote Linux server over ssh and scp. I can upload and download files but not install apps. Now I want to put a git repository on this server. When I try to clone from an over scp copied repository I get the following error message: sgit-upload-pack: Com...

3
голосов
1ответов
1517 просмотров

Paster cannot stop daemon

I'm using the following command in my pylons app in an attempt to stop the daemon on the server: paster serve --daemon dev.ini stop This is the error I get: No PID file exists in paster.pid Could not stop daemon; aborting Wondering how I can stop this daemon so I can reload dev.ini. Thanks!

0
голосов
1ответов
150 просмотров

How can I remotely log on to a machine, execute a script which sets up an environment, then accept user input?

I've been trying to figure out a way to do this for a few hours now, and am having no luck. I have a large environment file that I have saved as a ksh script. This script works perfect if I type . ./setEnv.sh However, what I'm trying to do is use either ssh or rsh to log on to a remote system,...

2
голосов
1ответов
2924 просмотров

How can I get git and copSSH to look in the correct directory for keys?

I just installed copSSH for Windows. When I boot it up I get a directory C:\copSSH\home\Nick\.ssh which has my pub and private key it. When I access this directory via a Cygwin bash window using ssh [email protected] I get happily logged in. However, when I open a git bash window with git c...

0
голосов
3ответов
890 просмотров

Access GIT via Cygwin but not via Git Bash?

I have installed msysgit - and I am trying to get it working. When I run a cygwin bash terminal - I can access my ssh via ssh [email protected] When I try the same via a Git Bash git ls-remote [email protected]/path/to/git I simply get a fatal: the remote end hung up Any ideas what to do ?

7
голосов
4ответов
10782 просмотров

msysgit troubles

So I seem to have some real issues setting up msysgit. I can connect via putty to my SSH directory using ssh://[email protected]:port And I have the correct keys. I can also do this using plink via the plink -P PORT [email protected] -i /path/to/private_key.ppk When I attempt to run (via TortiseGIT)...

5
голосов
1ответов
2981 просмотров

Using pseudo tty with ssh results in warning

I am using ssh from my application and must pass "-t -t" to ssh in order for it to work correctly. Otherwise, the stdin of my application is interfered with by the call to ssh. Forcing a pseudo terminal to ssh via the -t -t avoids this issue, but instead results in the following obscure error m...

5
голосов
2ответов
2113 просмотров

Installing java on linux using ssh

I want to install java on many computers using ssh so I want to write a bash script that will do (roughly): for c in computers do scp jre--.rpm $c ssh $c 'sudu -s; chmod a+x jre--.rpm ; ./jre--.rpm; echo "success!"' done The problem is that during the java installation I need to "rea...

8
голосов
1ответов
21370 просмотров

fatal: Not a Git Repository

So I have SSH working now no problemo and I have setup a new git repo in my /home/Tom/Git/myapp.git I provided access to another drive for hosting the repo so the directory "Git" actually exists on D:\ using ln -s /cygdrive/d/Git/myapp.git Now when I attempt to clone my git repo usin...

17
голосов
10ответов
36468 просмотров

Can't get SFTP to work in PHP

I am writing a simple SFTP client in PHP because we have the need to programatically retrieve files via n remote servers. I am using the PECL SSH2 extension. I have run up against a road block, though. The documentation on php.net suggests that you can do this: $stream = fopen("ssh2.sftp://$s...

0
голосов
2ответов
357 просмотров

How can I replace a command-line SSH tool with a PHP web call?

I'm building a web control that will let our junior IT staff manage firmware on our LifeSize phones. Currently we do this by uploading the new firmware onto a central server, then running this command for each phone we want to upgrade cat new_firmware.cramfs | ssh -T [email protected] "upgrade all" ...

3
голосов
6ответов
1536 просмотров

How to dump a database using mysql (no mysqldump on server)

I need to dump a database from a shared hosting that somehow doesn't have mysqldump installed. In fact, I only have mysql and mysqladmin available from the whole set of MySQL utilities. Is it doable or I'll need to resort to installing something like phpMyAdmin?

1
голосов
1ответов
3094 просмотров

Any free C# ssh server libraries or an alternative secure remote console solution?

I have an application that provides real time log messages for users. Currently the application works by having the server listen on a straight forward TCP socket and the users can use a telnet client to connect. Once connected they get asked for their username, password and can then set a filter...