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

learn more… | top users | synonyms

3
votes
4answers
16k views

How can I share files between two Linux machines over LAN?

I am currently running Fedora 18 with Gnome on two computers which are connected to the same router. I have been using Samba to share files between the two, but I know there must be a better way. On ...
1
vote
2answers
1k views

How to transparently monitor SSH access/network traffic in Gentoo/general linux?

What's the most effective way to monitor SSH access in Gentoo Linux? My Gentoo box is operating locally behind my broadband router. I have SSH port forwarding on the router and a DNS entry pointing ...
2
votes
2answers
2k views

Connecting to host by SSH client in Linux by proxy

I am really struggling with this. My host (A) is behind a proxy/firewall (PF) and needs to connect to host H. The proxy has HTTP/FTP/SOCK proxy configured and I have no issue to configure in ...
0
votes
1answer
37 views

How to identify which application is trying to access the unixbuild server?

The error message I am seeing is: Failed publickey for raj from 10.*.*.** port 34355 ssh2 Mar 18 05:22:34 unixbuild sshd[16956]: [ID 1000034 auth.info] Failed password for raj from 10.*.*.* port ...
-1
votes
1answer
160 views

SSH File Transfer

Is it possible for me to use SSH to transfer files from my linux computer to my macbook, if so, can anyone post a brief tutorial? I kind of understand how to use SSH, but I need to know how to find ...
0
votes
1answer
166 views

Local host always being added to /etc/hosts.deny when trying to SSH

I have a rather odd problem with my server. For some reason the local hostname for my workstation keeps getting added to the /etc/hosts.deny and when I try to SSH I get: ssh_exchange_identification: ...
3
votes
1answer
3k views

SSH via Corkscrew to a remote server not working

I am trying to SSH to a remote server from my college network (proxy). However, I am getting this error whenever I try to SSH to the host ssh_exchange_identification: Connection closed by remote host ...
2
votes
1answer
171 views

Configure SSH keys for production and DR server

Here is the case, we have successfully configured SSH keys (and hence password-less SFTP connection) between ProdServer-A to ProdServer-B. It works, or so I thought still yesterday. Yesterday ...
3
votes
2answers
727 views

Detecting monitors on machine over local ssh connection

I need to write a script to check on video related things on machines in the local network, e.g. Is a monitor plugged in? Are the video drivers up to date and appropriate for the hardware? Is Xorg ...
-1
votes
1answer
178 views

How to fetch logs from diffrent servers using one command? [closed]

How to fetch logs from diffrent servers using one command? For example, suppose I want to fetch logs for same id in different servers. I have to go to each server and search for logs. Is there any ...
14
votes
2answers
6k views

(SSH) Is it dangerous to close terminal without “exit”?

This happened many times. While the SSH active, I'm so tired and just close the terminal without exit Is it dangerous to doing like that?
2
votes
2answers
126 views

Remote access SSH problem

I have been asked to setup a lab with 1 PC (fedora 18 OS) and 4 SGI (IRIX 6.5 OLD OS). I am using a switch to connect them to university's network, and I asked tech guys to assign static IPs to them. ...
0
votes
2answers
1k views

access a command line via a web browser

2 questions: Question 1 My job blocks ssh which means that I cannot ssh to my home server. However, they do allow https out. Is there a package out there for ubuntu that will allow me to connect to ...
0
votes
2answers
160 views

SSH -L Tunnel no longer working

Local machine running my scripts needs to access a remote server's DB. Last week I could do, on the local machine ssh -f -N -T -L1081:localhost:3306 ueser@remoteserver -p2222 on the local machine: ...
2
votes
2answers
608 views

SSH client side problem: hanging and timing out on some hosts

From my laptop I'm trying to connect to HOST1 and I get: $ ssh -vvv user@HOST1 OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012 debug1: Reading configuration data /etc/ssh/ssh_config debug1: ...
8
votes
4answers
10k views

Prevent SSH client passing TERM environment variable to server?

I'm currently using Fedora 18 gnome-terminal, then started tmux multiplexer in it. After I connected to a CentOS 5 server via ssh command, I find: ls result has no color tmux, screen, hexedit, htop ...
2
votes
0answers
83 views

Why isn't hydra being disconnected?

I have SSHD running on port 5800 on some machine. (It is a my machine at home.) If I run this manually in a terminal: # ssh someIP -p 5800 The connection is lost because I am disconnected after 3 ...
4
votes
2answers
2k views

ssh_exchange_identification: Connection closed by remote host

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: ssh_connect: ...
2
votes
2answers
499 views

Provide passphrase to plymouth ask-for-password from command line

I'm working on booting a headless server (Fedora 16), entering the passphrase to decrypt the root disk (LUKS) over SSH using dropbear. I've got dropbear all working: I can SSH to the server while it's ...
2
votes
2answers
556 views

Why does my Emacs toolbar look different over ssh w/ X forwarding on Cygwin vs CentOS?

I'm using Emacs 24.2.1 installed on a CentOS 5 server, which I ssh into with X forwarding (using -Y). I have both a Windows laptop with Cygwin/X installed, as well as a desktop running CentOS 6. When ...
4
votes
2answers
209 views

Determining the Password Status of a User

I have a debian box that I connect to via SSH. I have removed the password from the users root, and my personal account using the instructions here, and set up a public/private key pair so I can log ...
3
votes
1answer
840 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 ...
0
votes
2answers
234 views

how to code c++ via ssh with Vim or Vi? [closed]

Would I have to rent and configure a server or something? I'm sort of new to unix, but when I was in school I had this nifty setup where I could ssh from any terminal in linux or mac or putty in ...
6
votes
2answers
19k views

bash shell - ssh remote script capture output and exit code?

I wish to use shell to invoke a script on a remote server. I would like to capture the output of that script (its logging messages) and the exit code it returns. If I do this: ssh user@server ...
17
votes
3answers
2k views

How to prevent shutdown when an SSH user is logged in?

I'm administrating a networked environment and I had an interesting situation arise yesterday. When a host is required to shutdown by a regular user, it refuses to do so if other users are logged in ...
2
votes
1answer
1k views

SSH host key keeps changing

I am trying to set up a web service (using the Play Framework) on an Ubuntu machine on the network. However, I am experiencing intermittent failures connecting to it, not being able to connect to it ...
1
vote
1answer
684 views

How to ssh on multiple ipaddress and get the output and error on the local *nix machine?

command="ls -lrt;uname -a;uname -o" for i in 10.38.227.229 10.38.164.103 do ssh auto21@$i "$command 2>&1" >> log #ssh -n auto21@$i "$command" 2> >> log done i am trying ...
11
votes
1answer
4k views

SSH causes while loop to stop

I have finally managed to boil down a problem I have been struggling with for a few weeks. I use SSH with "authorized keys" to run commands remotely. All is fine except when I do it in a while loop. ...
1
vote
1answer
271 views

setup password less ssh between two accounts from third account

There are two unix accounts A and B. I want to configure password less ssh between these two accounts.This can be done without much pain but my problem is that there are mutiple accounts like A and B ...
1
vote
1answer
339 views

Mosh doesn't reconnect

I installed mosh on a desktop and server yesterday (compiled latest v1.2.3 from source) and it works fine. I left the session open yesterday and have come into the office today to find my mosh session ...
2
votes
1answer
73 views

Change order of Private Keys passed via SSH login

ssh -i ~/.ssh/username username@xx.xx.xx.xxx -v Server is set to accept only 3 log on tries. The ssh system is trying 3 identity files before attempting the correct identity file. debug2: key: ...
1
vote
1answer
1k views

SSH to machines in new subnet - connection timeout

I'm using RHEL4 and RHEL5. A new group of Linux machines are setup recently using 172.16.32.0/24. The existing RHEL machines are running on 172.16.1.0/22 and 172.16.4.0/22. When I try to ssh from ...
1
vote
1answer
310 views

Why I'm still able to use ssh reverse tunnel after closing reverse ssh connection?

I have created a reverse ssh tunnel to connect to a computer behind NAT using: ssh -R 9050:localhost:22 user@middleserver in the destination system. I closed the terminal that I entered this ...
2
votes
1answer
177 views

SSH to server, execute commands and give control back to user

How can I do something like this with one ssh command: echo << EOF echo "Choose a file:" * read f rm -r "$f" EOF | ssh user@host I can use the -tt (yes two t's) with ssh to make ssh read from ...
15
votes
5answers
7k views

Does a `scp` transfer close when I close the shell?

I have scp transfer (from one remote server to another), that is quite big. So maybe I want close the computer from which I executed this command, will this end the transfer? I have ssh access to ...
20
votes
3answers
16k views

Why SSH takes a long time to Connect

I have noticed that some Linux Servers in Network takes long time to connect using ssh. Situations: There are two situations I have faced: On some servers some times it takes a long time to ask ...
3
votes
1answer
876 views

Is there a way to find out how many instances of the root user are logged into a Linux machine?

We have a handful of users that login to our Linux virtual machine as root either through the vSphere client or through SSH and I want to see if there is a way to tell if multiple root users are ...
3
votes
3answers
698 views

Must I store a private key in a file?

I have a db-driven application that needs to communicate with another server via ssh. The web app can generate a keypair and give the user the pubkey, or it can accept the unencrypted private key in a ...
0
votes
3answers
527 views

Limit find results in SSH

I using a line like this to search for a bunch of files: find . -name "page.php The results are hundreds of lines and I can't see it all. (I'm trying to just copy/paste it into excel to analyze ...
3
votes
1answer
452 views

Tunnel AFP over SSH over Internet

I can't seem to figure out how to connect to AFP over SSH. Here is my setup: [Raspberry Pi] <---> [router] <---> (Internet) <---> [Client] I'd like to be able to connect to my ...
1
vote
0answers
937 views

Use dd to backup disk image within an OpenVZ container

I want to use dd to backup the disk of an OpenVZ VPS in addition to traditional cold tar backups. Because I may need to migrate to a different VPS provider. From end user point of view, OpenVZ ...
1
vote
2answers
91 views

how to require sudo to view files?

I have a ssh server. I allow people to connect to it if they want. I do my programming homework on it. I am in trouble with my teacher because people were cheating off it. I need to know how to ...
1
vote
1answer
1k views

Session terminates immediately after authentication

I have a RedHat 5.3 server with several regular users created. Since last Friday the user "xpto" is getting "Authentication failed" error messages. Tha account isn't locked out. I have reset the ...
2
votes
2answers
739 views

Use desktop speakers over SSH from laptop

I have VLC media player and media files on a desktop CentOS 6.3 set up (without a GUI). I can play the media files at the machine but when I issue the command via SSH it is silent. I'm guessing it's ...
4
votes
2answers
445 views

Is it possible to store ssh connection in bash script instead of $(ssh user@ip command) every time?

I think that the code that I already have is not very efficient as it has to connect each time to the same machine and execute a command. Code: tmp=$(ssh -nq $USER@$IP "$COMMAND" 2>> $LOG) ...
1
vote
1answer
268 views

I hang when I try to ssh into a machine with my username (or su to my user) [closed]

Yesterday I was freely able to ssh into server box-a, and it seemingly froze on me today so I killed my putty instance. I am now unable to ssh into it. It ssh's but the prompt does not appear. I am ...
7
votes
3answers
458 views

OpenSSH - map aliases in ~/.ssh/config to IP addresses in command line

Is it possible to query ~/.ssh/config in the command line? Let's say I would like to retrieve what IP address does the particular alias point to in a separate program, is it possible?
3
votes
2answers
181 views

Any ideas to simplify the awkward rsync expression below?

Here is expression: rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head ...
3
votes
0answers
2k views

The right way for dynamic ssh port-forwarding

Want my Firefox could use localhost:9099 proxy forwarded from vps server, why it doesn't it work this way? I always get bind: Address already in use $ ssh -vfND 127.0.0.2:9099 vpn OpenSSH_5.9p1, ...
5
votes
2answers
2k views

Regexp in .ssh/config

At work, I often have to log into hosts which follow a common naming scheme, e.g. qc01 - qc12, hc01 - hc10, and so on. All of these need to get the same config values in my laptop's .ssh/config. Of ...