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

learn more… | top users | synonyms

2
votes
1answer
347 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 ...
5
votes
2answers
1k 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
352 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 ...
4
votes
2answers
3k 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)?
3
votes
2answers
4k 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 ...
7
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
1k 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
359 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
1k 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
268 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
401 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
344 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 ...
7
votes
5answers
3k 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
958 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
371 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
10k 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 ...
53
votes
6answers
73k 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: ...
4
votes
3answers
715 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
2k 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
2k 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, ...
12
votes
3answers
31k 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 ...
27
votes
3answers
29k 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
630 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
368 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 ...
5
votes
2answers
5k 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?
3
votes
1answer
489 views

How do I push a Mercurial repository to BitBucket over ssh? [closed]

I created a public key for ssh and registered that key with BitBucket. I then attempted to push: $ hg push ssh://jhayward@bitbucket.org/johncharrell/[project name] pushing to ...
2
votes
3answers
2k views

Use SSH key authentification with custom user $HOME

I have some users which have different $HOME directories than /home/... The user homes are under /pkg/homeand /pkg owner is a different user but all users have group access to /pkg. But it seems ...
3
votes
3answers
4k views

How do I backup via rsync to a remote machine, preserving permissions and ownership?

Drive A is 2TB in a closet at home. Drive B is 2TB in my office at work. I'd like drive A to be the one I use regularly and to have rsync mirror A to B nightly/weekly. The problem I have with this ...
2
votes
2answers
582 views

Run program after finish ssh connection

How do I connect to ssh debian and running a program and let it continue to run after you finish my connection through ssh.
4
votes
6answers
32k views

Transfer files using scp: permission denied

I try to transfer files from remote computer using ssh to my computer : scp My_file.txt user_id@server:/Home This should put My_file.txt in the home folder on my own computer, right? I get ...
1
vote
3answers
726 views

How do I execute a newly installed application with Sudo?

I have just installed an application on my Amazon EC2 instance called sshpass. I am having trouble getting it to work properly ( although, it works correctly on a non AWS instance ). I've read in ...
5
votes
5answers
2k views

How to setup password-less ssh with RSA keys

I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are ...
1
vote
1answer
80 views

Rebooting makes me lose my password-less keys on other machines

When I reboot my machine (as I did today) I seem to lose some functionality, specifically my previous ssh keys that I had copied over to other machines that had allowed me to login without a password ...
4
votes
2answers
3k views

SSH not landing in the home directory

I have recently installed Raspbian into a Raspberry Pi. As part of the installation process I changed the user name and group from the default (pi) to my own (let's call it user) using usermod and ...
3
votes
3answers
3k views

How to fix bash or auto run /bin/bash on SSH login

When logging in as root at my server everything works fine, but when I log in as myusername the bash is not working correctly. The line starts with: $ instead of myusername@myserver:~$ and all ...
2
votes
1answer
728 views

Fail to ssh to remote machine via hostname

The problem is that I fail to SSH to a remote machine via its hostname, while using its IP works. The hostname returned by command hostname is: california_desert while the name returned by command ...
3
votes
2answers
3k views

How to login from remote server to my own PC?

For the experiment purpose I need to login to my own PC from the remote PCs which are under the same domain, i.e: university network. How can I do remote login in this case using SSH? As an example, ...
1
vote
1answer
9k views

How to fix “operation not permitted” on ssh login?

My previously fine working ssh login now results in a "Operation not permitted" error after getting a connection accepted. I can't think of anything I changed except for restarting the server, so what ...
0
votes
1answer
2k views

Deleted the authorized_keys file and got into a problem

I was trying to send files from machine A to machine B. For that, I created a public-private key pair using ssh-keygen -t rsa in machine A. Then I sent the id_rsa.pub file to machine B and I added ...
1
vote
1answer
1k views

Safety of SMB versus SFTP

I have a server with OpenSSH enabled. I use it to make distant backups. I mainly use rsync over SSH and SFTP. I understood that these protocols are quite safe. I am interested in enabling Samba share ...
2
votes
2answers
1k views

Can't do SSH public key login under encrypted home

I can't do ssh public key login to my server and I think this issue is related to the fact my home is encrypted. I chose the option "encrypt my home folder" under the Ubuntu install setup. The ...
1
vote
3answers
8k views

can't get gnome-session working over SSH

I am new to using SSH, so sorry if this question is too rudimentary. To sign into my office computer from my home computer through ssh I go through these two steps: first I login to my office server: ...
3
votes
1answer
4k views

Getting Dropbox to sync over SSH

I am using Scientific Linux on my office computer and home laptop. I was usually signed in before I leave my office so when I made a change over SSH on my office computer, Dropbox would automatically ...
4
votes
1answer
2k views

Does the SFTP server accept passwords at all?

I'm trying to connect to a sftp server via sftp USERNAME@SERVERNAME. Whatever I do, I get "Permission denied (publickey)." Googling doesn't help as everybody recommends switching to key-based ...
2
votes
1answer
715 views

Is it *really* possible to directly steal a private key if it uses no passphrase?

I've read in various places, such as in this question that using an ssh key pair without a passphrase allows attackers to steal your private key if they gain access to your account. I assumed that by ...
2
votes
2answers
209 views

is it possible to trigger `ssh-add <key>` only when I ssh into a box? (from Cygwin)

I've got my .bash_profile set up to eval $(ssh-agent) so I can quickly connect to servers. If I add ssh-add ~/.ssh/id_rsa_my_key to my .bash_profile as well, I'll have to type the ssh key passphrase ...
2
votes
2answers
5k views

Linux CentOS 5 SSH User Permission Denied

Today when I try to SSH into my server, I get a permission denied message (same for sftp). It used to work well before, I didn't change any server settings, except I was trying to modify a few folders ...
1
vote
1answer
200 views

SSH login to remote machine from another remote machine - How to manage connections?

Due to some security policy I had to ssh into a remote machine using another remote machine to which I ssh-ed. Here is the situation. I have access to BSD box at work and the access is only available ...
4
votes
1answer
801 views

How to “jail” a user account's network capabilities on Linux?

Linux box a is connected to a home DSL line with dynamic DNS registration, hosting a tmux session to which multiple clients connect in read-only mode over SSH. All users connect using the same ...