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

learn more… | top users | synonyms

3
votes
3answers
466 views

Where did scp put these files?

I ran an scp command to download some files from an SSH server. Instead of using the . to put it in the current folder, I accidentally typed *. It looks like scp copied the files and put them ...
5
votes
1answer
815 views

Ssh keeps asking for passphrase several times

I have a remote machine, with which I have set up public-key ssh auth - that is, I can ssh to it without typing in password each time. And I have a set of actions in a script, which use that ssh ...
3
votes
3answers
2k views

Can I do ssh and do for loop and touch files in a single shot?

for account in ${accounts} do `ssh -q id@server "touch EVENTS_${account}_${date}.log"` done Instead of doing ssh so many times, can I just do ssh and run the for loop and touch the files?
3
votes
1answer
852 views

Can I set how long ssh-agent keeps keys in memory?

I'd like to have my keyfiles leave memory after a certain amount of disuse. Is there a way to make ssh-agent expire keys faster? It feels like it keeps them in memory and not needing a passphrase for ...
2
votes
0answers
119 views

Why do I get a different RSA fingerprint when multihopping using ProxyCommand

I'm using the following config to connect to multihop to the target host (gw2 and target have my public key stored in the authorized_keys file ; no netcat on all systems): Host gw1 HostName ...
2
votes
2answers
7k views

Change default path for when I SSH in to CentOS server?

I have a CentOS 5.7 web server, and I want to change the default place I land in when connecting using SSH. Currently I land in /home/username, and I want to land in /home instead. I've gone in as ...
5
votes
4answers
8k 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 ...
1
vote
1answer
2k views

Ubuntu Server - Access webserver from other LAN computer, setting up SSH or FTP, closing ports?

I'm running Ubuntu 11.10 x64 Server, with apache2 installed. The setup is pretty much default configuration. I have a few questions about; DocumentRoot/Static IP/Connect from LAN/SSH or ...
1
vote
2answers
684 views

using SSH to connect to remote CentOS 5.6 server where Firefox running on server is very slow [duplicate]

Possible Duplicate: How to speed up X over SSH on a slow network connection? I've installed firefox on CentOS 5.6 and I'm using X11 SSH to remotely login to view the browser. Firefox ...
0
votes
2answers
252 views

Autentification on SSH connection in OneLine [duplicate]

Possible Duplicate: Shell Script for logging into a ssh server I need to connect via SSH to a remote server, however I must do this with out interactive mode and with out use Public keys ...
2
votes
1answer
164 views

Why logs show a different ssh connection port # than the one specified?

My Ubuntu runs ssh on port 22. But my /var/log/auth.log says different port numbers when connections are made. And the port numbers are seemingly random: Connection from xxx.xxx.xxx.xxx port 33692 ...
1
vote
1answer
1k views

How can I send data to the STDIN of a background process?

I'm trying to: Launch several ssh sessions (processes) through a script (Python) Communicate with the sessions by sending them commands via STDIN (even though they aren't open in my current ...
0
votes
2answers
718 views

How to check that ssh login was successful in a script?

I do run ssh server "svn info /path/to/codebase" from php. It works fine but I wan to know how to check if the ssh login was not successful. I want to check from my php script that ssh server is up ...
3
votes
4answers
3k views

SSH: I have a *.pem private key. How to create a SSH connection using it?

I tried to use putty also. I select this pem key there and got this: Unable to use key file "key.pem" (not a private key). I read that it is possible to convert a pem to a pub key. I did it like ...
35
votes
4answers
24k views

Is it possible to find out the hosts in the known_hosts file?

I would like to see what hosts are in my known_hosts file but it doesn't appear to be human readable. Is it possible to read it? More specifically there is a host that I can connect to via several ...
2
votes
1answer
496 views

How do I build Lynx with SSL on Mac OS X?

I'd like to build and install Lynx on Mac OS X. I've found out that building is as simple as running ./configure, but I'm having trouble building with SSL support. I've downloaded openSSL. How do I ...
12
votes
3answers
2k views

Can SSH passwords be sniffed out over Wi-Fi?

When you ssh, can the password you enter to connect, be intercepted if you're using untrusted public Wi-Fi (coffee shop, library, airport, etc).
2
votes
1answer
299 views

Why doesn't my new cygwin .bashrc interactive check work?

I just updated Cygwin and the new .bashrc contains this line right at the top: echo "BEFORE TEST" # If not running interactively, don't do anything [[ "$-" != *i* ]] && return echo "AFTER ...
3
votes
0answers
574 views

“Operation not supported” for setfacl inside a python script [closed]

I've programmed a script using python which logs in as root on the host machine and executes some commands. Therefore it uses ssh. I want to setup acl. If I do following commands in the command line, ...
5
votes
2answers
4k views

How can I run Yast with X and ssh?

I have an openSUSE machine which I log on to with ssh -X. I don't want to log in as root but I do want to run graphical Yast. Inside the ssh session sudo starts the console version of Yast. However, ...
0
votes
2answers
516 views

SSH connection does not work while browsers do

I have the following network layout: Internet comes true fiber optics to modem. From modem LAN cable goes to router. Since that router wifi signal is weak, a LAN cable goes to another router from ...
7
votes
3answers
33k views

Shell Script for logging into a ssh server

I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code: set timeout 30 /usr/bin/ssh -p 8484 ...
7
votes
1answer
1k views

SSH not terminated after exit when there is X Forward program

After running X programs over SSH, SSH doesn't terminate after shell exit (have to use e.g. CtrlC to kill it). My guess is although the X program already exit, there is still some "connection" left ...
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. ...
4
votes
2answers
4k views

Running a command on the remote host with interactive SSH (conditionally)

I would like to be able to automatically run a command on a remote host each time I log into that host, but within the current interactive SSH session. Something like ssh user@remotehost [run do.sh] ...
5
votes
1answer
407 views

Is there any way to get an HTML page rendered through Chrome/Chromium from a console?

Is there any way to get (into a file, for example) a rendered HTML page from Google Chrome/Chromium, but from a console. For example, SSHed into a machine that has Chrome/Chromium installed on ...
5
votes
5answers
620 views

I messed up my zshrc on a remote server and now I can't run any commands!

On a remote machine I changed my zsh settings and it is now broken, for every keypress it says: "url-quote-magic:1: url-quote-magic: function definition file not found " I don't have another ...
2
votes
1answer
712 views

How to setup port redirection after a ssh connection has been opened?

I'm using openssh on both client and server. I know I can run ssh -L or ssh -R to setup some port redirections over ssh. However, since they are command-line parameters, such redirections must be ...
14
votes
7answers
43k views

Execute remote commands, completely detaching from the ssh connection

I have 2 computers, localpc and remoteserver. I need localpc to execute some commands on remoteserver. One of the things it needs to do is start a backup script that runs for a number of hours. I ...
2
votes
3answers
4k views

Finding the IP address of an ssh connection made in the past

A few weeks ago I made a few ssh connections from my home PC to my college PC and the other way around. Currently I am sitting at my home PC and I am trying to figure out what was the college PC IP ...
5
votes
1answer
251 views

Running programs over ssh

I am planning to log in to my college PC using ssh and run some simulations. These simulations take very long time, so I would like the relevant process to run longer than the ssh session (I want to ...
6
votes
3answers
500 views

firefox process dies after ssh log out on remote machine

I need to run firefox on a remote host via ssh and keep process running even after ssh logout. I already have tried these ways: nohup firefox & screen disown -h But it seems these work only ...
7
votes
3answers
11k views

How to check if I can log in to server via ssh?

I have a list of servers: cat list.txt 10.10.10.10 servera 10.11.10.10 serverb How can I check that I can log in via ssh to them or not? I mean by default I should be able to log in via ssh key ...
1
vote
2answers
2k views

ssh root@localhost error; help me hack this box :)

I need to gain a root shell on a linux vm for a security class. I have a user account on the system and a means to write to any file (i.e. /etc...) and want to escalate my privileges with: ssh ...
1
vote
2answers
208 views

How can I use the same IP from the Internet and intranet?

I have an Ubuntu firewall box (Alma), at the office, with a web server on it. It looks like this: [Internet] <-> [DSL Router] <-> [Alma] | ...
5
votes
2answers
3k views

Why SSH is asking for my private key password each time

Since yesterday, each time I try to connect to an ssh server, I got asked for my password. What should I do to make SSH not ask for my password each time.
19
votes
2answers
7k views

How do I know if my ssh tunnel is created successfully?

I rely on the following script tunnel.sh written by others to keep a ssh tunnel alive: #!/bin/bash export SSH_HOST=tim@server if [ ! -f /tmp/.tunnel ] then echo "Creat SSH tunnel" ssh -f -D 9999 ...
3
votes
1answer
2k views

ssh tunnel on ssh tunnel between Windows and two Linux machines

I have the following configuration and want to establish a tunnel on a tunnel. I read already the following topic: How to put a tunnel in a tunnel? My configuration: Notebook --> Linux Server A ...
7
votes
2answers
397 views

Continue shell commands once connected to SSH

Not sure if the question I'm asking is correct but basically I wanted to automate this process scp ~/.ssh/id_rsa.pub username@example.com:~/ ssh username@example.com mkdir .ssh cat id_rsa.pub ...
6
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
4k views

What slows down my ssh login?

Everytime I ssh login to a server, it is always very slow. As a reply to my earlier post said, "grepping through a 200 line file should take millisecond or so, so I would doubt its that." I tried ssh ...
52
votes
7answers
19k views

Is it possible to run ssh-copy-id on port other than 22?

I have a server with SSH running on a non-standard port. Instead of 22, it runs on 8129. To log in, I use: ssh -p 8129 hostname Now, whenever I need to set up a key for password-less login, I have ...
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 > ...
14
votes
3answers
15k views

How do you copy the public key to a ssh-server?

Here is what I have tried, and I got an error: $ cat /home/tim/.ssh/id_rsa.pub | ssh tim@just.some.other.server 'cat >> .ssh/authorized_keys' Password: cat: >>: No such file or directory ...
9
votes
1answer
1k views

How to detect when a shell is owned by a remote SSH session?

My question is similar to this one, but I'm looking for something slightly different. I have a notebook PC that I use to access Linux machines on a network in two different scenarios: I have a ...
5
votes
5answers
11k views

sshfs always asking for password in fstab?

I'm trying to enter an sshfs mount in /etc/fstab with the following line: sshfs#oli@192.168.0.2:/media/usb0 /media/ExtHD fuse defaults,nonempty,allow_other 0 0 So that this volume is mounted at ...
3
votes
3answers
14k views

How can I get the address of my local machine?

I'm on a macbook running Lion. In Terminal I'm connected to my schools server with ssh. I navigated to a folder on the server and have a file I want to copy to my local machine, but I don't know what ...
1
vote
1answer
553 views

Mounting Remote Filesystem over SSH as a Different User

Due to a breach of security, the administrators of the work server have implemented a new method of security. To log into the server, we must log in as our own user (which has severely limited ...
2
votes
4answers
1k views

How to replicate (fork) the current terminal

Say I am using terminal and have sshed to a remote machine and did something. How do I create a new terminal tab (or window) so I still has everything from the previous terminal window without having ...
4
votes
2answers
520 views

Sharing private keys across machines

Say I have local access to two machines A and B and remote access to machine C. If I generate a public-private pair of keys for accessing machine C from A, can I share the private key with machine B ...