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

learn more… | top users | synonyms

9
votes
3answers
2k views

How to execute a remote command on a local file?

Is it possible to do this: ssh user@socket command /path/to/file/on/local/machine That is to say, I want to execute a remote command using a local file in one step, without first using scp to copy ...
4
votes
1answer
1k views

How to fix unison failing with “Fatal error: Internal error: New archives are not identical” for identical paths?

When trying to sync two paths (one of which is remote) via ssh, unison fails with Fatal error: Internal error: New archives are not identical. while syncing via a network mount works just fine. ...
2
votes
2answers
879 views

SSH public key login: two different keys and SSH_AUTH_SOCK behaviour

A user (user1) on an Ubuntu 12.04 desktop has two SSH RSA keys configured: ~/.ssh/id_rsa and ~/.ssh/id_rsa1 (and .pub files). Both public keys are configured in the authorised keys on the server's ...
12
votes
4answers
6k views

How can I solve this ssh-agent problem?

I'm using Linux Mint, and have not been able to get gnome-keyring to unlock automatically at login, it seems. A symptom of my problem is as follows: $ ssh-add Identity added: /home/me/.ssh/id_rsa ...
0
votes
1answer
634 views

Why does sshd accept local network inbound connections and refuse external inbound connection?

When I try to connect to my server from the internet, I always get: debug2: ssh_connect: needpriv 0 debug1: connect to address XX.XX.XX.69 port 22: Connection refused ssh: connect to host XX.XX.XX.69 ...
9
votes
1answer
529 views

Redirect linux console on boot

Is it possible on boot to redirect the console output to a screen session? The server has no monitor attached, and I'd like to be able to see the primary console output. I've seen other posts about ...
11
votes
2answers
580 views

Understanding SSH tunnels

I have linux (Ubuntu) server which I have root access to through ssh (port 22) only. On that server there is a MySQL database listening on port 3306. Is it possible to use putty (on my machine) and ...
2
votes
3answers
503 views

How to append / extend zshell completions?

I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance). This could easily archived by the following code: ...
6
votes
1answer
1k views

How to use ssh-agent with multiple (valid) keys and yet choose which one to use?

Let's say there are two keys A and B, both of which are valid for user@host public key authentication. Since authorized_keys is configured for different behaviour depending on the key, ~/.ssh/config ...
5
votes
3answers
3k views

A Web ssh/telnet client

I'm in kind of a tight spot right now. I wanted to know if someone has seen a HTML, or PHP web ssh client as both my company and school block everything besides port 80. I'm a control freak when it ...
0
votes
2answers
368 views

Ssh through two servers and a user in one command line [duplicate]

Possible Duplicate: How do I connect to a pc through another pc using ssh How to go about doing in one command line the following operations? $ ssh server-one $ su - user $ ssh server-two ...
3
votes
2answers
736 views

Block SSH to all but root user

How can I modify my sshd_config so that it blocks access to all users except the root user? I've had a look and I tried AllowUsers root DenyUsers * But that doesn't do anything
3
votes
2answers
3k views

Accessing Linux server from Windows machine in graphical mode via SSH

I need to access one of my school Linux servers from my home computer that runs Windows. And I need to access graphical desktop (X server) on them remotely, not only shell. The problem includes 3 ...
0
votes
1answer
796 views

Specifying ciphers and protocol 2 in .ssh/config

I would like to be able to specify in my .ssh/config file that ssh uses protocol 2 (command line argument -2), and which ciphers to use with it. The following does not seem to work (I get bad ...
4
votes
1answer
310 views

Force pubkey-auth user to set password at first login

When I create a new user account I ask users to send me a public key, and want to force users to set the password the first time they log in with keypair authentication. If I create an account with an ...
3
votes
2answers
2k views

Fastest remote X from Windows

I have the following set up: |-----------------| |---------------| | Windows | LAN (or VPN) | Linux box | | (local machine) | ...
3
votes
2answers
639 views

Fastest ssh X tunneling on a local secure network

I have read in a few websites e.g. (1) that the default ssh cipher is not necessarily the fastest. I work on a local fully secure network. Assuming that security is not an issue and that I just care ...
1
vote
3answers
176 views

User's name appears as “bash-3.0” on SSH shell

I am working on a Redhat server and one of the users' names appears as "bash-3.0" on the "SSH Secure Shell Client." His name is appearing correct under /etc/passwd. How could this happen? How can I ...
2
votes
1answer
450 views

Double SSH tunnelling for SMB shared folder

I am actually working from PC1 (using Mac OSX) on a distant computer(Linux) PC2 using SSH. This distant computer PC2 does not have any connection to Internet but is in a network with a PC3 (Windows ...
7
votes
1answer
1k views

Reusing ssh session for repeated rsync commands [duplicate]

Possible Duplicate: Using an already established SSH channel I have a remote server accessible via a chain of SSH proxies. The resulting channel is wide and fast enough, but setting it up ...
4
votes
4answers
2k views

Graphical interface on a remote server?

I've got a VPS with Debian running on it. I connect to it using SSH and configure it in a console mode. Now I want to install some graphical interface to it and use my VPS in graphical mode from my ...
4
votes
2answers
1k views

How to override port settings when connecting to a public wifi?

I am connecting to a free public wifi, I want to connect or use other ports like FTP and SSH. What are the possibility to override it? In order to connect to the internet, They are requiring me to add ...
3
votes
3answers
3k views

Bash Auto-Completion feature for SSHing into Different Hosts

I have big list of servers which I normally ssh to all the time. Is there any way using bash or zsh so that I can keep the list of hostname and bash auto-completion goes through the file and gives me ...
3
votes
0answers
712 views

How to efficiently use Console2 with screen/tmux/byobu?

I'm using Console 2 and msysgit's bash to SSH into my Linux machines. There, I'm using screen (but considering tmux and/or byobu), but currently simply with one single-terminal session per ...
2
votes
1answer
276 views

su and redirection

The following line shows the principle of a construct which I can use under Red hat 5.5: $ echo "foo" | ssh myhost "echo \"cat <&1\" | su --login" foo Actually it was never clear to me why ...
3
votes
2answers
816 views

Close ssh session that has ControlPersist and is kept alive in the background

I have ControlPersist 4h in my .ssh/config and it works perfectly, Every now and then I need to connect to this server that requires some special authentication, and if I don't use that account for ...
2
votes
2answers
226 views

ssh-add on an intermediate ssh hop node

I am on machine A, hopping onto machine B to finally reach machine C. A --ssh--> B --ssh--> C When I ssh-add my private key on A, all works fine and I can hop onto B as many times as I want ...
3
votes
2answers
1k views

SSH to a remote computer having only the public IP

Is it possible to connect to a computer behind a router via SSH knowing only the public IP address (of the router)?
2
votes
2answers
3k views

SSH jumping over socks(4/5) proxy chain. Host -> socks proxy -> socks proxy -> destination

I got a great answer for my previous question about connecting from Machine A to Machine C via Socks proxy located on Machine B. Say Machine B Ip is 218.62.97.105 and it is listening on port 1080 ...
6
votes
1answer
3k views

SSH over Socks proxy without username or password

I have a list of SOCKS proxy servers from this site. I've read about creating a dynamic tunnels with ssh -D and to be honest i've tried that already. Unfortunately for some reason I cannot connect to ...
4
votes
1answer
866 views

scp permission denied after 'hardening' with bastille

I recently 'hardened' two Ubuntu servers using Bastille, and now I get permission denied: scp whenever I try to scp files in. SSH login works fine. I've tried adding an /scp-dump folder with 777 ...
2
votes
2answers
273 views

Unzip to location

I am using unzip through putty and it works ok. However, using the same command through a .NET C# SSH library (Renci.SshNet) gives different results. SshClient s = new SshClient("ssh_host", ...
7
votes
1answer
714 views

Given a private SSH key, how do I recover my public key?

I've somehow lost my id_rsa.pub file. I still have my id_rsa file. How do I recover the public key from the private key? (This question came up after ssh-copy-id was reporting "ERROR: No identities ...
0
votes
1answer
214 views

How to run svn when ssh over ssh?

I need to run sudo -u wwwrun sh -c 'svn status -uq /srv/www/htdocs/loquat' over ssh. When using one ssh it works smoothly. Now there is one server that needs to be connected through another server via ...
1
vote
1answer
294 views

Putty doesn't seem to start from python'd crontab

I have the following Python script, chmod +x'd. When I run this script from the command line and Putty has not been started, it launches putty: #!/usr/bin/env python from __future__ import ...
2
votes
1answer
251 views

ngircd refuses connection over ssh tunnel

This might be just a misunderstanding of how ssh tunneling works, but here goes: In my ngirgd.conf file I have the following: Ports = 6669 Listen = 127.0.0.1 This ngircd server is running on ...
6
votes
5answers
2k views

How to effectively use screen and SSH?

I'd like to configure SSH and screen such that a login will always reattach to a screen session. Ideally, that session would not quit but detach when I press C-d. How can this be achieved? And what ...
3
votes
1answer
699 views

SSH within SSH displays the wrong machine name in the xterm title bar

I am working on a distributed system connecting to several servers at once. Nothing is started manually in the program I am working on, but this is how to recreate the error manually. I start a xterm ...
2
votes
1answer
241 views

Tunneling SSH through multiple machines (for SOCKS)

I have seen questions on tunnelling SSH through multiple machines but I want to tunnel a SOCKS connection. Normally I would use something like ssh -C2qTnN -D 8080 username@remote_machine to make the ...
0
votes
2answers
3k views

“Host key verification failed” even with removed ~/.ssh/known_hosts

When I try to ssh to my server from a linux computer with debian, I just get Host key verification failed. The only help I found online was deleting the key from ~/.ssh/known_hosts... well I did not ...
35
votes
3answers
37k views

ssh-add complains: Could not open a connection to your authentication agent

I've been trying to get ssh-add working on a RaspberryPi running Raspbian. I can start ssh-agent, when I do it gives the following output into the terminal: ...
3
votes
3answers
459 views

How do I tunnel SSH over SSH?

I have successfully setup a tunnel over SSH on linux mint, and can browse the web. However, when I try to ssh using the same port, I get: Couldn't establish connection to proxy: Network is ...
3
votes
1answer
1k views

New terminator window on remote server

Is there a way to open a new terminator pane on a remote server when connected by ssh? I am looking for something similar to what can be done (according to this answer) by tmux but using terminator ...
5
votes
2answers
915 views

Can't share an ssh connection with rsync

In my .ssh/config file I have the following: Host xxx User yyy HostName zzzz ControlMaster auto ControlPath ~/.ssh/%r@%h:%p This works great for multiplexing my ssh connections (i.e. login once, ...
10
votes
3answers
23k views

sudo over ssh: no tty present and no askpass program specified

I keep getting this error and have tried several ways discussed online to fix this and none are working for me. I have setup SSH keys so when I run 'ssh newton@host.com' it automatically logs me in, I ...
19
votes
3answers
14k views

SSH inside SSH fails with “stdin: is not a tty”

I'm trying to connect to machine one with ssh and then connect to another machine two with ssh, but I get this error. ssh user@computerone.com 'ssh otheruser@computertwo.com' stdin: is not a tty ...
4
votes
1answer
494 views

How to decrypt an encrypted container via ssh without entering a passphrase while requiring some client authentication?

I log in to a server via public key authentication and then mount a container (using e.g. LUKS/dm-crypt or truecrypt). At the moment, I have to enter the container password manually. Is there a way to ...
3
votes
1answer
305 views

Configure SCP access for login without a local account

Can I set up accounts that can do SCP that are NOT local users (i.e. users with an entry in /etc/passwd)? I've tried googling for SCP "without PAM authentication" or alternative authenication for sshd ...
1
vote
1answer
1k views

Using RSA private key from PuTTY in Filezilla

I have created an RSA private key using PuTTYgen. When I try to use it, I am notified that I can't use this encrypted key in Filezilla, so from the documentation I found that I need to use the Pageant ...
4
votes
2answers
3k views

How can I send single file to multiple remote sites at the same time?

Can scp be used to send a single file to multiple remote servers at the same time? If so, how? If not, what's the alternative?