SSH (Secure SHell) is a protocol for running commands on a remote computer.

learn more… | top users | synonyms

3
votes
1answer
293 views

How can I silence ssh-agent?

I have a script like this one at my .bashrc file at the mysuer home: eval `ssh-agent` ssh-add /path/to/my/key The problem is I have this output when I log with the user mysuer (su - myuser): Agent ...
3
votes
2answers
4k views

SSH login via IPv6 successfull while using IPv4 to the same host yields “Permission denied”

I'm currently stumped by a strange problem… I have a dual stack host to which I want to SSH. If I connect via IPv6 everything works like expected datenwolf@foo ~/ > ssh -6 bar.example.com ...
0
votes
0answers
32 views

SSH remote command execution: get output before execution ends [duplicate]

Consider the following simple C program test.c: #include <stdio.h> int main(void){ printf("foo\n"); sleep(5); printf("bar\n"); return 0; } The program prints ...
3
votes
2answers
77 views

Specify script to run with SSH upon login

I would like to know if there is a way to specify what script to run (on the remote machine) at login. I'm logging into a Debian box with key-pair authentiation (no password needed). The script ...
5
votes
1answer
2k views

How many users does Linux support being logged in at the same time via SSH?

I know Linux supports multiple users being logged in at the same time. But what's the maximum number of users that can be logged into Linux at the same time? I see there are there are 69 tty files ...
6
votes
2answers
584 views

Special character '#' in Perl SSH command

I try to send command using SSH in my perl script with # but it gets truncated right at # Example: Input text is : $message = "Product ID # STK000134" The SSH command is : $execute=`ssh -q ...
1
vote
1answer
136 views

Why does rsync look for DSA instead of RSA key when run from cron job?

I want to backup files from a server to my local computer using rsync. I can only log-in to the server with an RSA ssh key. I have stored the passphrase to the key in Seahorse Passwords and Keys, ...
0
votes
2answers
267 views

SSH connections not accepted after configuring NFS?

I have a couple of servers in a VPC in Amazon EC2. One of them acts as a NFS server, and one of them as a client. I recently noticed a problem in the client that after a reboot, it would reject all ...
1
vote
0answers
2k views

Using sshpass, return code (exit status) differs for reasons unknown using valid commands

There are a few things going on here but I think ultimately, either CLish or SSH is returning an exit code that is messing up my work flow. I'm attempting to connect to a remote machine (CLish shell) ...
2
votes
1answer
238 views

ssh-add -D doesn't erase stored keys from the ssh-agent

How come this happens?: stan@tcpc:~/.ssh$ ssh-add -l 8192 e0:45:5e:cc:45:3e:17:2b:a6:54:6f:8d:53:1b:j2:e3 github (RSA) 2048 25:41:53:a6:45:5d:ac:eb:5c:45:f8:ce:42:a9:he:aa BITBUCKET (RSA) ...
12
votes
5answers
687 views

what's the purpose of ssh-agent?

I've read the official definition: ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA, ECDSA). The idea is that ssh-agent is started in the beginning of an ...
1
vote
1answer
274 views

Why ssh -nq -t can't see my environment variable?

I am executing a command on remote machine with -t flag ( to prevent the command from 'blocking' ) the prompt (somehow it works that way). So I am using ssh -nq -t root@ip but with this, the script ...
0
votes
1answer
175 views

I'm able to remotely ssh into Cygwin on XP, but it warns “Could not chdir to home directory” and my /bin is almost empty

I've made a firewall exception, opened ports 22 through 443 to the correct internal IP (I think), and am able to log in using my external IP, but it's like I have very limited view access to almost ...
2
votes
1answer
127 views

SSH lets me login with a password even though I set “PasswordAuthentication no”

I'm trying to turn off password authentication for SSH after setting up public key access. I have these set in my /etc/ssh/sshd_config file: PermitRootLogin without-password PasswordAuthentication no ...
7
votes
1answer
1k views

Forward all ports SSH

I have a question about SSH/Port forwarding. I haven't found the solution anywhere and don't know if there is any. I have a server behind my NAT box at home. I have port forwarding from my NAT box to ...
1
vote
1answer
270 views

Having the 'id_rsa.pub' file in my dotfiles public repo securely

So this is something that I'm wondering, how can I have this file in my dotfiles GitHub repo? I'm sick and tired of having to generate a new SSH key every time I'm on a new computer or re-install my ...
0
votes
1answer
78 views

ssh private key stops accepting my passphrase

When booting my laptop today I found that ssh (openssh) simply refuses to accept my passphrase when reading my private key. My only idea of how that could've happened is if the HDD has somehow ...
2
votes
1answer
1k views

Getting no tty present and no askpass program specified when using git over ssh

I'm trying to push a git commit from my laptop to my server but keep getting the following error message: remote: sudo: no tty present and no askpass program specified To ...
1
vote
2answers
471 views

How to troubleshoot failed X11 forwarding with ssh?

When I try to establish an X11-forwarding connection to myserver, I get the following error: % ssh -X myserver xlogo X11 connection rejected because of wrong authentication. X11 connection rejected ...
0
votes
2answers
65 views

ssh with identical machines

I have two identical beaglebones that I'm working with. They have the same hostname and originally had the same IP, though I changed one to see if that made a difference. They're going to be deployed ...
0
votes
2answers
39 views

can't update with this error messg

I got this message: not enough free disk space.... The upgrade needs a total of 31.8 M free space on disk '/boot'. Please free at least an additional 31.8 M of disk space on '/boot'. Empty ...
2
votes
3answers
4k views

Use socks proxy for commands in terminal

I connect to a remote ssh server by running this command: ssh -D 12345 bob@myserver.com This creates a socks proxy that I can use with Firefox to bypass censorship in my country. However, I can't ...
1
vote
1answer
1k views

Passwordless ssh on archlinux (after ssh-copy-id still prompts for password) [duplicate]

On ubuntu/mint, all I need to do for passwordless ssh login is: ssh-keygen -t rsa # on both pc ssh-copy-id targetpc ssh targetpc # does not prompt from password anymore and that's all.. I do the ...
2
votes
2answers
193 views

End process from another SSH window

I forgot to use screen and I have a task that has been running for quite some time, and I do not want to lose the saved data. Basically Ctrlc will end the task and save the data if I am on the same ...
3
votes
2answers
213 views

Grant ssh access for single session

I wonder if there is a tool/modified ssh-server/ssh option which enables me to grant ssh access for a single session to a given user. What I want to avoid is creating a user account and password for ...
0
votes
1answer
104 views

Keep the ssh session

I am using Macbook developing a client application. I want to access server logs, so I opened a shell terminal and established a ssh connection to the server and access the log file there by ...
0
votes
2answers
166 views

DenyHosts and no-ip.com

I recently installed DenyHosts and after a few remote logins I noticed that sshd: 8.23.224.110 had been added to the host.deny file after /var/log/auth.log showed a few sshd: Did not receive ...
0
votes
2answers
556 views

scp hangs on SSH2_MSG_SERVICE_ACCEPT received

I frequently scp my file to remote host. But suddenly it started taking more than 30 seconds to copy 20kb file.It used to take not more than half a second. After referring to some blog I appended ...
4
votes
1answer
278 views

preventing the screen from being cleared when exiting an ssh session

I have rdist set up to push out some of my dot files to all the remote machines that I need to ssh into. I also have zsh as my default shell on all of those machines. When I ssh into a machine and ...
1
vote
1answer
353 views

SSH disconnects when screen locked with vlock

I'm using tmux + PuTTY to get all the UNIX goodness I need when using Windows. I have the following settings in my .tmux.conf: set-option -g lock-command vlock set-option -g lock-after-time 1800 As ...
2
votes
1answer
245 views

Restrict two way SSH and Apache authentication to non-local networks

I am using Google's open-source PAM module for two-way authentication for SSH logins and certain Apache directives. It works great, however I would like to use this only when trying to log in from an ...
0
votes
1answer
1k views

Unable to login to my server using ssh

Yesterday I was migrating to my new server, needed to use rsync, I created a RSA key, so that rsync could connect, I saw an error that says add to trusted key in location x I didn't have that location ...
0
votes
2answers
104 views

Transfering files using ssh

I've found the following command pretty convenient for transferring files to servers I have ssh access to: cat myfile.txt | ssh my.host.edu "cat > myfile.txt" Is there a similarly convenient ...
0
votes
1answer
565 views

non root ssh keys help

I'm having issues setting up a different CentOS account with its own pair of SSH keys. I have created the required files but when connecting with Putty it says Connection refused, here's the putty ...
6
votes
2answers
467 views

ssh-agent: don't forward authentication for the whole keyring

I have two private ssh keys : one to access my personnal machines, one to access servers at my job. I add those two keys to my ssh-agent with ssh-add. Now, when I do ssh -A root@jobsrv I ...
0
votes
1answer
196 views

emacs fonts from ssh not as good as locally installed

How can I have the same emacs fonts and antialiasing configuration that I have in my local Ubuntu 12.04 also working when I open an emacs session via ssh to a CentOS 5 system? EDIT: I didn't get an ...
0
votes
1answer
39 views

Synchronizing subdirectory with root directory

I have files like this on my linux web server: folder1/ <- main, this is where users of my page are led to folder1/testing/ <- copy of folder1(without folder1/testing/) to modify and optimize ...
0
votes
1answer
256 views

Copy modified files from one server to other

Scenario: 2 Servers (*.12 and *.13) CakePHP "application" on both of them. *.12 is "Production" Server *.13 is "Development" Server Now i want to copy all files modified the last 2 days from test ...
10
votes
1answer
9k views

scp and compress at the same time, no intermediate save

What is the canonical way to: scp a file to a remote location compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient) do the above without ...
1
vote
1answer
105 views

Access X-window and sound on laptop on another Unix

I read up a lot about forwarding x-server onto remote machines, but I feel like I'm too dumb to get it to work. Let me first explain my goal: I have a Rasberry Pi running archarm hooked up to a TV. ...
2
votes
1answer
515 views

How to password-less log on via ssh alias

Suppose I have access to pc via a server. I can directly log-on to pc by using How do I connect to a pc through another pc using ssh Such that my .ssh/config looks like: Host short Hostname pc User ...
2
votes
1answer
816 views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
1
vote
1answer
2k views

How to put value of echo pipe netcat commands into variable [duplicate]

I have this command succession: echo -ne "/dev/shm/test.sh" | netcat 89.196.167.2 4567 and let's say it return a string like, for example "Hello...bla". (on the 89.196.167.2 i have made a server ...
4
votes
4answers
6k views

Automated ssh-keygen without passphrase, how?

I would like to make an automated script that calls ssh-keygen and creates some pub/private keypairs that I will use later on. In principle everything works fine with.... ssh-keygen -b 2048 -t rsa -f ...
1
vote
1answer
129 views

doing an rsync across multiple machines

I have the following setup: Machines A, B , C running linux. I have to do a continuous rsync from machine A to machine C and have a script for that. However, the access to machine C from machine A is ...
1
vote
5answers
2k views

How to securely automate running commands as root with “sudo su -”?

hint (on client side, how to encrypt files/pwd's): # encrypt pwd with ssh key: openssl rsa -in ~/.ssh/id_rsa -outform pem > ~/.ssh/TEMP-id_rsa.pem 2>/dev/null openssl rsa -in ~/.ssh/id_rsa ...
1
vote
4answers
6k views

How can I share files between two Linux machines over LAN?

I am currently running Fedora 18 with Gnome on two computers which are connected to the same router. I have been using Samba to share files between the two, but I know there must be a better way. On ...
1
vote
2answers
600 views

How to transparently monitor SSH access/network traffic in Gentoo/general linux?

What's the most effective way to monitor SSH access in Gentoo Linux? My Gentoo box is operating locally behind my broadband router. I have SSH port forwarding on the router and a DNS entry pointing ...
1
vote
2answers
796 views

Connecting to host by SSH client in Linux by proxy

I am really struggling with this. My host (A) is behind a proxy/firewall (PF) and needs to connect to host H. The proxy has HTTP/FTP/SOCK proxy configured and I have no issue to configure in ...
0
votes
1answer
35 views

How to identify which application is trying to access the unixbuild server?

The error message I am seeing is: Failed publickey for raj from 10.*.*.** port 34355 ssh2 Mar 18 05:22:34 unixbuild sshd[16956]: [ID 1000034 auth.info] Failed password for raj from 10.*.*.* port ...