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

learn more… | top users | synonyms

3
votes
1answer
1k views

Giving SSH users read-only access to a directory

I'm running Fedora 17 and I want to give several users access to files on my secondary hard drives on /run/media/haukur/. This is what I initially did: chmod -R 755 /run/media/ But every time I ...
8
votes
2answers
2k views

How do I background an SSH session? [duplicate]

Possible Duplicate: How can I break away from an SSH session that has crashed? I have started an SSH session on the command line, but now I want to get back to my local command line. For ...
7
votes
2answers
4k views

How can I set up SSH on Linux to log in password-less?

My Raspberry Pi is running the default Debian image and has SSH enabled. I log into my Pi as follows: ssh pi@<IP-address-of-my-Pi> I have to enter my password every time. Can I somehow make ...
3
votes
2answers
6k views

SSH + Sudo + Expect in Bash script: Run command with sudo in remote machine

I am trying to automate the deploy of some .deb packages with an script. I want to execute sudo dpkg -i $myDeb.deb in a list of remote machines I can access with ssh. I've tried to automate the ...
1
vote
1answer
813 views

Start SSH session in some other directory than their home directory and lock them there

I've set up a SSH server which I've let some friends log into, both via SSH and FileZilla. I put a symbolic link to two hard drives in their home directories so that they could access some files. This ...
5
votes
3answers
1k views

Is it possible to download extremely large files intelligently or in parts via SSH from Linux to Windows?

I have a ~35 GB file on a remote Linux Ubuntu server. Locally, I am running Windows XP, so I am connecting to the remote Linux server using SSH (specifically, I am using a Windows program called SSH ...
3
votes
2answers
1k views

Is there a way to find the mac address of a remote machine I have connected to with ssh?

I have machine at the office which is shut off I was hoping to turn it on from home using wake on lan. Reading about this, I have realized that I need the MAC address of the machine. Is there a way to ...
4
votes
1answer
3k views

Can I use an SSH key generated on Linux from Putty?

I have been asked to generate a pair of SSH keys so that I can access a remote server for development. To generate the keys, I used the ssh-keygen tool on our CentOS box, which I successfully did. ...
8
votes
6answers
36k views

exit out of all SSH connections in one command and close PuTTY

Is there a way to back out of all SSH connections and close PuTTY in "one shot"? I work in Windows 7 and use PuTTY to SSH to various Linux hosts. An example of the way I find myself working: SSH to ...
1
vote
1answer
553 views

Detached screen on a remote host

I have a local script that runs a remote script via ssh. The local script is minecraft.php: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {$this->pemkey} {$this->ssh_user} ...
3
votes
3answers
3k views

SSH connection freezes after bigger output when inactive for a while

I have a problem with an SSH session freezing after using it again when it was idle for a while. The problem is that the session doesn't freeze immediately, I can still use it. But as soon as a ...
1
vote
1answer
2k views

perform remote sqlite command

If this should be moved to the DBA exchange, I apologize. Feels more like linux than DB to me, so here goes: I've got some machines that run scheduled cron jobs every night and email me the output. ...
10
votes
2answers
17k views

How to ssh to a server using another server? [duplicate]

Possible Duplicate: ssh via multiple hosts For connecting to server B I have to first ssh to server A. What's the command line to access server B?
2
votes
3answers
4k views

How to edit file on remote machine with text editor?

I am on a Windows machine, and I am using NoMachine to connect to a development box. Unfortunately, the box runs on RHEL5, so lots of software is not supported. I want to use Sublime Text. Is there a ...
2
votes
1answer
436 views

SSH connection timeout

I'm periodically establishing short SSH connections to one of the local servers. I observe intermittent timeouts. After investigating the issue, I found that SSH timeouts happen when there is a lot of ...
7
votes
3answers
742 views

Prevent a unix account from being able to SSH [duplicate]

Possible Duplicate: Disable direct login for normal users (like oracle) in linux but allow scp and sftp? I want to prevent a unix account from being able to be SSH'ed with, but it should ...
2
votes
1answer
5k views

how to check if ssh works without connecting to server

I just want to check whether following code will work or not. It is like a validation su -oracle "ssh oracle@$MY_IP -o 'BatchMode=yes' -o 'ConnectionAttempts=1'" returnCode=$? echo "$returnCode" ...
1
vote
1answer
587 views

Crontab with SVN and Git

I have some repos which are both in SVN and Git. My username is guyfawkes, and in my home directory I have folder www which contains all my repos. In this directory I also have file update.sh: ...
3
votes
3answers
694 views

Is encrypting your web browsing via SSH to localhost useful?

For example, if I did an ssh -X to localhost and invoked Firefox, would that be enough to be considered safe browsing, like if done on some public wifi?
2
votes
4answers
2k views

Run if statement on remote machine

I'm trying to run a set of commands on a remote machine, that includes an if statement. I'm using this to shutdown a list of kvm instances. The first line should be fine, but could be prettier, rest ...
6
votes
2answers
2k views

SSH LocalCommand on exit

In ~/.ssh/config you can use the LocalCommand directive to execute a local command whenever you connect to a remote machine via SSH. But how do I execute a command when I exit an SSH connection? It ...
3
votes
5answers
6k views

Fix terminal title after SSH remote logging to another machine

right now I am using an one-line perl code to change titles of my terminal bars, print("\e]0;@ARGV\7"); but every time after I ssh to another remote machine, the title will be modified by the host ...
1
vote
3answers
1k views

How can I share a desktop / log in graphically for an Ubuntu that I have ssh but not console access to?

http://www.ubuntugeek.com/share-your-ubuntu-desktop-using-remote-desktop.html tells how to share a desktop by setting multiple features from within a GUI. Is there such a HOWTO that is based on ssh ...
1
vote
1answer
1k views

How to create an user only with SSH -access and easily-set-up .ssh -dir perms?

I often mess up when I manually set up the .ssh -dir, easy to forget some flag. I often need to create a new user and only allowing access with SSH, how can I do that? Basically, I want to stop doing ...
4
votes
2answers
2k views

Two-step remote ssh without password

I'm looking to ssh from my localhost to a remote server, and from there to a remote computer. I currently have it set up so that the remote computer and remote server have passwordless ssh-ing set up ...
5
votes
1answer
738 views

Public Key Auth + Kerberos

I've setup public key authentication for ssh'ing into my university machine. However, it only logs me in on the local machine and doesn't give me Kerberos credentials which I need for accessing my ...
1
vote
1answer
281 views

Re-install ssh-keygen on unix/mac

Something is wrong with the way my Mac generates ssh keys. This has been the second time where I've created a key with ssh-keygen -t rsa. When I paste the created id_rsa.pub to use in a connecting ...
5
votes
2answers
4k views

Connection ec2 instance operation timeout error using ssh

After creating a new instance, I am trying to access my instance like below: ssh -i private_key.pem root@my_instance_public_domain but the operation is timing out. I have updated the private key ...
11
votes
4answers
3k views

Get ssh to forward signals

I want to be able to send signals (SIGINT is the most important) through ssh. This command: ssh server "sleep 1000;echo f" > foo will start sleep on server and after 1000 seconds it will put ...
20
votes
4answers
19k views

Is there ever a reason to use scp instead of rsync?

Is there a reason to use scp instead of rsync? I can see no reason for using scp ever again, rsync does everything that scp does, with more safety (can preserve symlinks etc).
3
votes
4answers
249 views

SSH asking for password after ssh-copy-id

I created a key on my machine with ssh-keygen. I copied the key to remote machine using ssh-copy-id. Tried to connect to remote machine but it asked me the password. Both machines are ubuntu (local ...
3
votes
2answers
8k views

Bypass ssh password prompt from a shell script

I've got a shell script that ssh'es into a server using public key authentication and runs a command on that machine. This works fine on machines where the users have installed the public key on the ...
6
votes
5answers
1k views

ssh command unexpectedly continues on other system after ssh terminates

I'm running the below command, and monitoring the output file on the other system: ssh $ip_address 'for n in 1 2 3 4 5; do sleep 10; echo $n >>/tmp/count; done' If I kill the ssh command ...
3
votes
1answer
456 views

How do I transfer files to a SunOS server via sftp with FileZilla?

According to the admin of the webserver, I should be able to use Filezilla to transfer files to the server but I am getting an error. I set up Filezilla for transferring files sftp - using these ...
5
votes
2answers
2k views

ssh localhost without password doesn't work on Fedora 14

I performed: $ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa $ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys then in /etc/ssh/sshd_config changed StrictModes to no and restarted sshd. And I ...
2
votes
1answer
425 views

How to recover from a corrupt xdebug session?

Sometimes my local computer crashes when I'm in the middle of a xdebug session. When I reconnect to my remote server with a reverse shell I get this warning: Warning: remote port forwarding failed ...
0
votes
1answer
1k views

What is the default encryption type of the ssh-keygen?

When generating private/public keys with ssh-keygen what types of keys will it generate if I wont pass -t option followed with the encryption type like rsa?
2
votes
2answers
15k views

Problem with SSH “ Write failed: Broken pipe ” [duplicate]

Possible Duplicate: What does the Broken pipe message mean in an SSH session? I run a program on server with SSH ! the program runs normaly and after a period of time i receve a message ...
0
votes
2answers
10k views

Checking if files exist in some remote folders with bash

I need to do a script to look in some folders and send an email if there are files in these folders. I've tried to do something like this but I get errors with the command variable and print of the ...
15
votes
6answers
30k views

How to download a file through an SSH server?

I have a server in USA (Linux box B), and my home PC (Linux box A), and I need download a file from website C, The issue is, it is very slow to download a file direct from A, so I need download the ...
21
votes
4answers
62k 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 won't have access to ...
5
votes
2answers
3k views

How to find the cause of an ssh-scan exploit?

One customer emailed my about their provider about to shut down a server because ssh attacks. I logged in to the server and found a lot of ssh-scan processes, and some strange files in /tmp. I had ...
3
votes
2answers
8k views

Cannot SSH to localhost - host key verification failed

I'm new to Linux. I have 2 Debian Squeeze hosts running. Let's call them SqueezeOne and SqueezeTwo. After logging into SqueezeOne, I ran ssh-keygen and added the resulting public key to my authorized ...
5
votes
4answers
3k views

SSH tunnel hanging

I'm trying to use an SSH tunnel from home to a computer in the university so I can access some articles. Both machines are running Ubuntu 11.04, the university machine runs openssh-server. I my ...
5
votes
2answers
22k views

Unable to resolve hostname

So I try to do: ssh $(hostname) and it tells me: ssh: Could not resolve hostname woofy: Name or service not known It knows that its own hostname is "woofy"; why can't it connect to itself?
4
votes
2answers
1k views

DD-WRT and /bin folder permission

I have a project with a wrt54gl modem, and we need to copy a file from computer into modem (in modem /bin folder), but we have a problem when we copy the file with scp copy: "permission denied". We ...
7
votes
3answers
6k views

Give user permissions to all files and folders

I want to have a user who has access to all the files and folders on the system. This is for the purpose of using RSYNC on a local machine to backup a remote machine. At the moment we are using the ...
2
votes
1answer
541 views

Setting up a user for sftp acces into a sub directory of another users home directory

An interesting problem. The broader goal is to setup a directory that one of our clients can sftp into (via ssh keys, not user/pass combination) and upload files. This directory will need to be ...
4
votes
3answers
6k views

SOCKS proxy without ssh command

Currently I create a ssh tunnel using: ssh user@server -D 1234 to use SOCKS proxy. How do I configure server so I can directly connect to socks server? I want to set firefox socks host to server ip ...
2
votes
1answer
21k views

How do I execute a remote shell script over SSH and be prompted for passwords by commands that require it in that script?

I want to do something like this ssh user@remote-domain.com ./remote_script.sh Contents of remote_script.sh #!/bin/bash hg pull This example is much simpler than what I am actually doing. I know ...