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

learn more… | top users | synonyms

17
votes
2answers
12k 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?
11
votes
2answers
8k 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. ...
19
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 ...
9
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
730 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 ...
9
votes
3answers
5k 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 ...
10
votes
4answers
34k 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 ...
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
13k 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 ...
5
votes
4answers
10k 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
7answers
10k 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 ...
7
votes
3answers
13k 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
10k 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 ...
6
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 ...
6
votes
3answers
20k 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 ?
5
votes
3answers
7k 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 ...
3
votes
4answers
1k 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. ...
1
vote
1answer
103 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?
6
votes
3answers
15k 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
4k 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
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 ...
4
votes
4answers
328 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
412 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
4k 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 ...
8
votes
1answer
453 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
2answers
8k 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
651 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
2answers
141 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
71 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
595 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 ...
2
votes
3answers
442 views

ssh: execute a command before login

I am looking for a way to execute a local command when logging into a remote machine via SSH. (I want to stay logged in after the command has finished.) In other words, I want to specify the command ...
2
votes
3answers
133 views

Can I bridge “backwards” from an ssh connection to my local emacs-server?

I'd very much like to log in to a remote machine with ssh and via the $EDITOR environment variable (or something similar) be able to edit in my local Emacs. In this case, specifically for when I log ...
2
votes
1answer
256 views

How to put a tunnel in a tunnel?

I know I can create an ssh tunnel and then tell a program (with tsocks) to use it for networking. But. How can I put an ssh tunnel in an ssh tunnel? I mean I can't again use the tsocks in tsocks ...
1
vote
3answers
86 views

Using nohup to keep a script running indefinitely

I am very new to Linux and I've only been using it to SSH to my web server using Putty. The issue I am having is this: Basically I've got 2 php scripts. One get_tweets.php constantly listens for ...
1
vote
2answers
487 views

Shell Script - how to scp into remote server and download files and protect password

I have a remote server that I need to download Apache logs from. I can manually scp into the server and get the files, but I'd like to put this in crontab. The only way to automate it is to include ...
1
vote
2answers
205 views

How can I ssh to a remote server with an automated password and no key?

I have a remote server. I planned to use public keys to connect over ssh without typing the password but the remote system rejects public key authentication. So what is the best way to do it? What ...
1
vote
1answer
58 views

osx server, windows client, running emacs opens it on server not client

I've installed emacsformacosx on my OSX box. I'd like to shove my macmini in a data center and run it headless. I've gotten x-windows working. If I run xeyes, it displays on my Windows 7 client. ...
1
vote
2answers
1k views

SSH connection establishment too slow [duplicate]

I'm having issues while connecting to my Local Centos 6.3 VM with 500 MB ram. Below is the output of ssh -vvv localhost connection: OpenSSH_6.3, OpenSSL 1.0.1e 11 Feb 2013 debug1: Reading ...
1
vote
2answers
120 views

one IP several guests same port 22

I use Nginx to redirect my domains coming on port 80 to the correct virtual machines, now I'm wondering if I can do this with ssh on port 22. Redirect all ssh traffic to the correct guests through ...
1
vote
2answers
2k views

How can I scp a file that my user can't read but I can sudo?

Can I use scp to copy a file from a remote server which my login user can't read, but where I have permission to sudo to root (without password even)? How?