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

learn more… | top users | synonyms

5
votes
1answer
292 views

Automated ssh login with passphrase?

Logging onto a machine over ssh typically requires a password to be entered before access is granted. Alternatively, a key/certificate (without a passphrase) can be installed onto the remote machine ...
3
votes
1answer
664 views

Route SSH to host through interface

Is it possible to route all outgoing requests for SSH (port 22) to mydynamicdns.afraid.org via wlan0 instead of eth0 when both are connected? Since my IP is dynamic, I would like to use a name ...
2
votes
1answer
228 views

SSH Connection into LAN without port forwarding?

I'm living inside a study union for the next few month. the organisation has its own network and gateways where the students are connected to the internet. problem: I don't have access to the routers ...
52
votes
3answers
34k views

how can shellshock be exploited over SSH?

Apparently, the shellshock Bash exploit CVE-2014-6271 can be exploited over the network via SSH. I can imagine how the exploit would work via Apache/CGI, but I cannot imagine how that would work over ...
18
votes
2answers
29k views

Is there a command to list all open displays on a machine?

When SSH'd locally into my computer (don't ask, it's a workaround), I can't start graphical applications without running: export DISPLAY=:0.0 If I run this first and then run a graphical ...
42
votes
4answers
42k views

What do the options `ServerAliveInterval` and `ClientAliveInterval` in sshd_config do, precisely?

I found this question, but I'm sorry I don't quite understand the settings on the two variables ServerAliveInterval and ClientAliveInterval mentioned in the accepted response. If my local server is ...
17
votes
3answers
13k views

Is it possible to set Gnome Terminal's title to “user@host” for whatever host I'm connected to?

I'd like to set the terminal title to user@host so I can easily tell which machine I'm connected to from the window title. Is there a way to do this from SSH or from GNOME Terminal?
13
votes
2answers
9k views

What difference between openssh key and putty key?

I've found ssh-keygen ("ssh" package) comand produce another keys that puttygen command ("putty" package). If I create public and private keys with ssh-keygen some ssh-servers can not accept my keys. ...
20
votes
2answers
3k views

SSH output isn't line buffered?

I'm running a script on a remote machine like this: ssh $host "pip install -r /path/to/requirements.txt" But the output isn't line buffered; instead of seeing one line returned at a time, all the ...
10
votes
2answers
2k views

Detach/reattach an application run on X over SSH?

I have a development server that I leave running all the time, and a development laptop that I turn off/on everyday. I have a GUI application on the server that I'd like to run over SSH -X, and I'd ...
16
votes
2answers
825 views

Why is this binary file being changed?

I am trying to copy files over SSH, but cannot use scp due to not knowing the exact filename that I need. Although small binary files and text files transfer fine, large binary files get altered. Here ...
12
votes
4answers
39k views

SSH login with clear text password as a parameter?

I need to login to a user that I've created on a remote host running Ubuntu. I can't use an ssh key because the ssh login will happen from a bash script ran within a server that I wont have access to ...
9
votes
3answers
7k views

Tell SSH to use a graphical prompt for key passphrase

How can I force SSH to request passphrases using a graphical prompt (GTK, for example) instead of the standard one that uses the terminal? I tried setting SSH_ASKPASS=/usr/bin/ssh-askpass but it ...
5
votes
4answers
11k views

Set some firewall ports to only accept local network connections?

Basic firewall question: How do I set up the firewall on a system in a LAN so that some ports are only open to connections from the local area network, and not from the outside world? For instance, ...
9
votes
3answers
7k views

Differences between VNC and ssh -X

Why would you use VNC (or for that matter NX) instead of just using ssh -X (-Y). I read that VNC uses less bandwidth, but is there any other differences/advantages with respective tool?
8
votes
2answers
2k views

How to efficiently use 3D via a remote connection?

I have one weak PC (client) but with acceptable 3D performance, and one strong PC (server) which should be capable of running an application using OpenGL twice, i.e. once locally and once remotely for ...
5
votes
4answers
16k views

Pseudo-terminal will not be allocated because stdin is not a terminal

I'm trying to set up automatic SSH hopping through a server which doesn't have nc. This works from the command line: ssh -A gateway ssh steve@target (I have added my public key to the SSH agent). ...
5
votes
3answers
1k views

Keep running a script via ssh

ssh can use to run remote commands. ssh me@server.com 'long-script.sh' I run a long script that will take a lot of time, but I want to close my computer and keep running the script in the remote ...
9
votes
7answers
11k views

How do I work with GUI tools over a remote server?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not ...
8
votes
3answers
12k views

ssh remote server on some port other than 22 without password

I am usually connecting to the remote server with ssh user@server.com -p 11000 and then giving the password each time for user. How should I avoid entering the password each time I connect ...
7
votes
3answers
14k views

ssh, start a specific shell, and run a command on the remote machine?

I am in a situation where several users are sharing the same user account on a remote machine. I have a "personal" directory where I wrote my own .zshrc file, and I would like to have a way to: ...
7
votes
3answers
22k views

How to make putty to not break my session after some time?

Each time putty is breaking session after some time if I am doing nothing. There is no any time parameter on putty so how can I stay my putty ssh session always Alive ?
6
votes
3answers
4k 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 ...
5
votes
5answers
9k views

Disable user shell for security reasons

We have several user accounts that we create for automated tasks that require fine-grained permissions, such as file transfer across systems, monitoring, etc. How do we lock down these user accounts ...
5
votes
4answers
7k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
4
votes
1answer
3k views

dot file not sourced when running a command via ssh

When I run my program interactively, it works fine: ssh somehost $ ~/some/path/somescript.py When I run my program over ssh directly, it doesn't work. The variable PYTHONPATH is not set, because ...
3
votes
4answers
2k views

passing passwords to a script

I want to scp a file to a remote host, and from there, run a command on the file, and exit the remote session. If I write a usual script, call scp and then ssh, I am prompted to enter two passwords. ...
2
votes
3answers
1k views

Kill backgrounded SSH when shell exits

I'm trying to spawn an SSH from my bash profile script that runs in the background for connection sharing (via its control socket). The problem I'm running into is a reliable way to ensure the SSH ...
1
vote
1answer
167 views

initiate ssh connection from server to client

We can easily connect via ssh to the remote machine that has public IP. But now I have a remote machine without public IP, and I need to connect to it from my machine that does have public IP. So ...
15
votes
3answers
1k views

Why change default ssh port?

I've noticed lot of admins change default ssh port. Is there any rational reason to do so?
9
votes
1answer
512 views

How can I limit ssh *remote* port forwarding?

I need to limit which ports can be remotely 'ssh -R' forwarded by an user. I know about permitopen option on authorized_keys, but as it says on man page it only limits local 'ssh -L' port forwarding ...
6
votes
3answers
16k views

How to pull a file from a server using scp?

I am on machine A and want to pull a file from machine B. A$ scp <myuserid>@hostB:<path of file in B> . it says that: scp: <path of file in B>: No such file or directory But on ...
4
votes
3answers
5k 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 ...
4
votes
2answers
3k views

How to connect two computers via internet with ssh?

I want to connect another computer via internet that doesn't have a public IP. Is there any away to do this?
4
votes
4answers
344 views

SSH to untrusted machine

If I SSH to a remote server, is it be possible for the admins of that machine to use my SSH session to send data back down the connection and do something to my local PC? I use DSA keys and do not ...
4
votes
3answers
3k views

How to find the machine from which a user logged into current machine using ssh?

In a multi server architecture, is it possible to find out from which machine a user logged into current machine using ssh? For example, user1 logged into host1. From there, the user logged into ...
3
votes
1answer
438 views

What should I check after an unauthorized access?

I accidentally left an open port on my router, leaving access to one of my computers via SSH, using a rather insecure password. I noticed because I checked /var/log/auth.log and there is just one ...
3
votes
2answers
5k 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 ...
2
votes
2answers
1k views

How can I make a process I start during an SSH session run after the session has ended? [duplicate]

Possible Duplicate: Keep SSH Sessions running after disconnection. I have a process which is basically a web-server, I start it during an SSH session. However, when I leave the session (by ...
9
votes
1answer
13k views

How to wget a file to a remote machine over SSH?

I'd like to basically pipe a wget command to a file on a remote server over SSH. How can I do this? I know I could simply ssh into the server and have it download the file, but I'd much rather use the ...
6
votes
2answers
14k views

X client forwarded over SSH “cannot open display: localhost:11.0”

I have enabled X forwarding on remote machine where SSH server is running: # grep -i forward /etc/ssh/sshd_config X11Forwarding yes # On local machine, I have started SSH client with -X flag ...
6
votes
2answers
2k views

working with filenames in a different encoding over ssh

I'm ssh'ing to a remote system where a different encoding for the filenames (and for the users' locales) has been used. And this causes some problems. Problems solved by matching the locale settings ...
5
votes
1answer
762 views

Non-printable-ASCII characters in sshd banner

It's possible to configure a banner for sshd that is to be displayed as a connection is opened, via Banner /etc/motd.ssh in sshd_config. Note that this is displayed before the authentication occurs, ...
5
votes
5answers
1k views

Multiple ssh sessions in single command

I'm trying to copy a database from one server to another. I tried using the following command and it's getting tied up on entering the ssh passwords. If I put in one server's password, it complains ...
4
votes
1answer
1k views

Is my default remote shell a trouble maker?

By finger tim on the server, I learned that my default shell is some script /usr/local/bin/bash-wrapper whose content is: #!/bin/bash USERNAME=`whoami` if ! grep ^$USERNAME$ /etc/domain-users > ...
3
votes
1answer
646 views

notify-send not working under ssh

Maybe this is answered somewhere else, but I didn't see it. I am running Ubuntu 14.04. When I SSH into my machine, for example: ssh <user>@<machineip> notify-send "Hello" I don't see ...
3
votes
2answers
261 views

Logging SSH access attempts

I've configured an ubuntu server with openssh in order to connect to it and execute commands from a remote system like a phone or a laptop. The problem is... I'm probably not the only one. Is there ...
3
votes
1answer
90 views

Unrar local files to remote server

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
3
votes
1answer
638 views

How to safely replace one Linux distribution with another one via SSH?

I'm intending to replace a NAS's Custom Linux with Arch Linux (details at the bottom), of course wishing to preserve all user data and (due to the SSH-only headless access) attempting to be fool-proof ...
3
votes
1answer
2k views

User logged in by sftp does not show up in `w`

My server is Centos 5. I have a chroot environment set up with the following in my sshd_config Match group sftponly ForceCommand internal-sftp ChrootDirectory %h AllowTcpForwarding no ...