ssh

Fastest Way to Determine User Permissions in /etc/sudoer

Users will be remotely accessing ***nix based machines via SSH and I need to determine the fastest way to check if the username that they are currently using has NOPASSWD access in the /etc/sudoers file. Possible options: grep for the username in /etc/sudoers, parse command prompt output to determine if it has NOPASSWD, if not, remove...

Mount a remote file system using SSHFS

Ok, the setup is a bit convoluted. Don't blame me, I'm not the sysadmin. Here's the situation. There is one machine that I can SSH into from outside the network. I can only remote in as root (yes, you heard right) using my private key. I know that it is more typical to log in as a user and then elevate privileges, but in this case, I ha...

What does it mean WCHAN 'finish' in ps -l <proc_id> output?

I'm running a number of ssh commands in a background. When the triggered-via-ssh command finishes to run, the appropriate background ssh process doesn't get terminated and its ps -l output shows 'finish' for WCHAN and T for 'state'. So why the triggering process is not terminated and what does it mean 'finish' value for WCHAN? Thanks a...

Running shell script in detached screen session. Must kill. How?

I am an Ubuntu Linux user. I am running jobs remotely and started a screen session. During this session I sourced a file containing a long list of command lines arguments to be executed. I was forced off of the connection and now the jobs are still running in this screen and I am unable to kill them. Does anyone know how to kill all ...

Set up Gitosis, but can't clone

I've set up Gitosis on a remote Ubuntu box which I will refer to as linuxserver as my host in the following commands. I'm also connecting from a Windows box using Cygwin. I followed the instructions according to: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way I had no problems up until I needed to clone...

mySQL Query Browser connection using ssh

Does anyone know if there's a problem with the mysql query browser using connections over SSH on the Mac? I use the command: ssh -L33306:localhost:3306 user@host then I try to open a connection with the MQB pointing it to localhost port 33306 I get an error "Could not connect to MySQL instance at localhost..." What's odd is that this ...

Parallel SSH in Python

Hi, I wonder what is the best way to handle parallel SSH connections in python. I need to open several SSH connections to keep in background and to feed commands in interactive or timed batch way. Is this possible to do it with the paramiko libraries? It would be nice not to spawn a different SSH process for each connection. Thanks. ...

How can I ssh into a remote host with Perl?

I want to write a Perl script which ssh's into a remote host, prompts for password before running some commands on remote host and parse the output in the local Perl script. Any help or pointers on this? Thanks! ...

ssh command execution doesn't consider .bashrc | .bash_login | .ssh/rc?

Hi, I am trying to execute a command remotely over ssh, example: ssh <user>@<host> <command> The command which needs to be executed is an alias, which is defined in .bashrc, e.g. alias ll='ls -al' So what in the end the following command should get executed: ssh user@host "ll" I already found out that .bashrc only gets sourced w...

ssh server C library?

I am looking for a C library that implements the server end of ssh. In particular, I am only interested in the subset that provides port forwarding. The ones that I have found so far (libssh2, NetSieben etc) seem to implement just the client. ...

Automating svn update

I'm frequently sshing into a server, switching to a specific directory and running svn-update I'm thinking that there's probably a very easy way to automate this, so I can simple specific a subdirectory when I run the script and it'll login via SSH, cd to the right directory and run svn-update. Is this a job for capistrano or could a s...

VSFTPD on windows and other issue.

I have to build an vsftpd compatible ftp client. I am not sure about which protocol vsftpd follows, sftp or ftps, I am guessing sftp as i could connect some vsftpd client with port 21(ftp) and 22(sftp) but not 990(ftps). Now I have to communicate with vsftpd compatible ftp server using C#.NET. Can somebody help me find out some good ope...

SVN remote repository

Hi folks, we're currently investigating SVN at work - having escalated our practices to include a fair bit of development. I have to confess, we're finding the remote setup process rather tricky, none of our team is that conversant with Linux/SSH. My question is, how many of you you administer your own remote SVN repository versus using...

Git,ssh,Cygwin and folders outside of Cygdrive install folders

Hi I am having terrible time getting files that reside on C:/ drive on remote computer. I can clone projects if they are under Cygwin installation folder. But I cannot get anything going with my real projects if they reside in something like "/cygdrive/c/myproject/git/export"? So I cannot get anything from the line below "ssh://user@...

Vim cursor shape question

I currently use MacVim for a lot of my editor needs but occasionally I need to edit files remotely over ssh. In MacVim the shape of the cursor varies depending on your current mode, i.e. command mode -> block cursor, insert mode -> vertical bar cursor, which I find very helpful. Is there a way to replicate this behavior in a .vimrc fil...

SSH connection in C++ under Linux

Hi. I am coding a simple networking tool in C++ that should be working under unix/linux operating systems. I need to make SSH connection in C++, i.e. C++ SSH client ? And don't forget - Linux, so don't point me to msdn. Thanks in advance. ...

What is the simplest way to SSH using Python?

What is the absolute simplest way to SSH to a remote server from a local Python (3.0) script, supply a login/password, execute a command and print the output to the the Python console? I would rather not use any large external library and not install anything on the remote server. ...

How do I create a link to open an ssh connection

I am trying to create a link to open an ssh connection to another computer. I am an OS X 10.5.7 and Ubuntu 9.04 user. I am tempted to create a symbolic link as such: ln -s "ssh user@computer_name" computer_name I know this is wrong. Could someone point me in the right direction? ...

Accessing LDAP through SSH tunnel

Hello, I got access via SSH (root access) to a Machine that's inside a network at my client's office. I'm programming in my computer a PHP application that needs to integrate to LDAP. The LDAP server is in another server at my client's network and not accesible from outside, however I can perfectly access it via the server I can conne...

get_allowed_auths() in paramiko

Hi all, I am trying to get supported auth methods from a running SSH server in Python. I found this method in the ServerInterface class in Paramiko but I can't understand if it is usable in a simple client-like snippet of code (I am writing something that accomplish in ONLY this task). Anyone can suggest me some links with examples, ot...