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

learn more… | top users | synonyms

12
votes
1answer
7k views

Convert OpenSSH private key into SSH2 private key

Is there a way to convert existing pair of OpenSSH keys to the SSH2 (ssh.com format) pair of keys? UPD: since there are some answers about ssh-keygen suddenly appeared, I'll explain where I came ...
0
votes
1answer
868 views

SSH hangs forever?

I'm trying to SSH into a remote VM, and the command hangs forever. Before, when I was trying to get some stuff set up on it, I edited /etc/hosts and /etc/init.d, and I'm worried I might have messed ...
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 ...
3
votes
2answers
406 views

how does ssh discover hostnames on the network?

We have a server on the company network named serverA, and if I type ssh serverA, it will connect my PC to this server, even though there is no entry for this server in my /etc/hosts, but I used to ...
3
votes
1answer
10k views

With SSH X11 forwarding (`ssh -X`), get `Can't open display` trying to run X applications

I'm able to login to sever using ssh -X Hostip but when i run the command xclock it give me this error Error: Can't open display: localhost:11.0 I check my Display value using echo $DISPLAY ...
4
votes
2answers
112 views

ssh to a specific machine within a network [duplicate]

I'm frequently transferring files and operating programs via ssh, and often from home. The machine I usually work on is a desktop at work that I cannot ssh to directly unless I'm already connected to ...
1
vote
1answer
900 views

Multiple SSH tunnels (local and remote forwarding) over one master OpenSSH connection? Good idea?

The question Using an already established SSH channel has an answer that intrigued me. It suggests that I can reuse an existing SSH connection. However, after further reading, I see that this solution ...
3
votes
3answers
1k views

How to bring back SSH session that was started with the -f option (run in background)

I'm pretty lost on this. From the man page: -f Requests ssh to go to background just before command execution. After starting SSH with the -f option, I have a working tunnel. But after I ...
2
votes
1answer
304 views

Establishing client VNC connection over SSH in one step (e.g., with the -via option)

How do I reduce these two commands to one? I am connecting from my client to an x11vnc server and the two commands below already work. I just wish to do it in one step: first command: ssh -fNL ...
3
votes
2answers
1k views

daemonize rtorrent

Just read the man page, but found no option for this. Maybe I missed it, maybe it doesn't exist. I have a server at home I'm SSHing to for rtorrent, but the torrent stops downloading and won't restart ...
3
votes
4answers
2k views

rsync over ssh tunnel

---------- /| /| ------------ | Home | | | | | | Work | | |--------| |---------------------| ...
0
votes
1answer
72 views

SSH from osx to osx and then use agent

I have a mac at home and a mac at work. The work mac is setup for ssh to all work related servers. Sometimes I have to connect from my home mac and access the servers which are setup on my work mac. ...
2
votes
2answers
693 views

ssh login in Bash script

I've been working on a series of scripts to perform tasks on my remote server, but have gotten stuck at how to log in via ssh mid script, as I cannot enter the password automatically. Is there a way ...
1
vote
1answer
1k views

ssh-agent: How to set it up so my CentOS server will only ask for passphrase once?

On my Macbook, my SSH private key is encrypted, but I never have to re-enter the passphrase even if I reboot the machine. The system must be unlocking it along with my user account. Is it possible ...
2
votes
3answers
3k views

what is the required ports to be opened on the firewall?

Currently I'll be installing one AIX server behind a firewall, I just asked to open port 443 to use the SSH protocol to access this UNIX server. I already changed the default ssh port to be 443 ...
3
votes
3answers
677 views

ssh password-less login doesn't work using proxycommand

I have 2 servers. I can connect to server B only using server A. In my ~/.ssh/config file: Host serverB Hostname serverb User root ForwardAgent yes Port 22 ProxyCommand ssh user@serverA nc ...
2
votes
1answer
4k views

Unable to ssh into Ubuntu 12.04 LTS [could not resolve hostname (hostname): Name or service not known

I'm just starting with a clean install of Ubuntu Server 12.04. I've run: $ sudo apt-get update $ sudo apt-get upgrade I've added the following to /etc/hosts: 127.0.0.1 (hostname) The file ...
2
votes
1answer
604 views

sudo hangs when run on remote host over ssh in a script without tty (-t)

I have an AIX 6.1 server where I need to run a remote sudo command in a bash script. Here is my bash script simplified: testSudo.sh #!/usr/bin/bash set -x sudo env I can run the sudo command ...
2
votes
3answers
1k views

How to run a script after connected with ssh

I've heard multiple answers of rights and wrongs and I still don't know if its possible. I ssh to a server then want to run a block of script. while read server <&3; do #read server names ...
1
vote
1answer
675 views

How do I increase my root volume

I have a server using software RAID (raid1) and I need to increase my volume on my root partition. I've been googling around with no luck of finding out how I can do this. I have 2x1TB RAID1. My df ...
0
votes
1answer
347 views

Pseudo-terminal message in script

This is my script #!/bin/bash exec < filelist.txt while read updatedfile oldfile; do # echo updatedfile = "$updatedfile" #use for troubleshooting # echo oldfile = "$oldfile" #use ...
0
votes
1answer
89 views

Emacs key problem

I am using Cygwin to connect to an Ubuntu installation, and for some reasons my Ctrlh for the help has been remapped to CtrlDel. When I actually type Ctrlc,h I get the error: No operation mapped ...
1
vote
1answer
108 views

ssh key authentication not working from network/if-up.d/ scripts

I have two nearly identical scripts in network/if-up that need to access SSH keys. Permissions on SSH private keys are 600, so how can my scripts access these keys? I would prefer to keep the SSH ...
1
vote
0answers
412 views

Connect two VirtualBox virtual machines through SSH

I have two VirtualBox virtual machines: one with SuSE Enterprise 10 and one with Red Hat Enterprise 5. I want to connect through SSH from RedHat to SuSE. Both are configured to use a bridged adapter ...
1
vote
2answers
254 views

Unable to force passphraseless ssh authentication while port forwarding

I'm completely at a loss as to what is preventing my local machine from authenticating the connection that is being forwarded from the remote server. I've read a ton of the posts on here regarding ...
3
votes
1answer
2k views

How to parameterize the LocalForward option in ssh_config?

I'm starting with this fully working ssh command: $ ssh -fNL 3306:localhost:3306 coolio@database.example.com This config gets me part of the simplification I am after: Host tunnel HostName ...
2
votes
1answer
74 views

SSH asks password when outside .ssh/ but not when inside .ssh/

This is the strangest I've ever encountered and I have no idea how to fix it. I have many entries in my .ssh/config file because I use a number of keys. When I ssh and I am located outside my .ssh ...
0
votes
1answer
335 views

Connecting to KVM on a GUI-less CentOS 6.4 using MobaXterm

I followed the directions at this question: Installing KVM on CentOS 6.4 without GUI (yet) But I'm not sure which feature (there are many!) of MobaXterm I should use to connect to the KVM. On the ...
34
votes
4answers
5k views

Why is root login via SSH so bad that everyone advises to disable it?

Everybody on the Internet advises to disable root login via SSH as it is a bad practice and a security hole in the system, but nobody explains why it is so. What is so dangerous in enabling root ...
1
vote
1answer
675 views

SFTP over reverse SSH tunnel?

I want to SFTP to a remote computer that is behind NAT. I can't modify the NAT router, so I have set up a reverse SSH tunnel using a middleman server. Here's what my SSH tunnel looks like: ...
3
votes
2answers
344 views

Is it possible to copy data from one screen session to another?

I recently needed to copy X amount of lines from a file, that I opened in vim and then paste them to another file opened in a different screen session (and different server). So on screen #1 I ran in ...
1
vote
2answers
209 views

How to check which SSH keys are currently 'active'?

How might one check which .rsa, .pem, and other files are 'loaded' or 'active' by ssh-add? I just had this scare: $ scp -i /home/dotancohen/.ssh/dotancohen.pem someUser@1.2.3.4:~/files.tgz . Warning: ...
2
votes
1answer
642 views

How to Change User Authentication Banner Message?

I have created a new user with -e option to make it active for just 30 days. This user do ssh tunnel using Bitvise SSH Client for Windows. When the user account has expired bitvise shows a User ...
0
votes
0answers
2k views

Can't connect through ssh?

I'm running two OSes, one (Backtrack 5) as a guest in VirtualBox and the other (Ubuntu 13.04) as the host. Now when I connect to my host through ssh (host-only connection): $ ssh 198.168.*.* -vvv ...
2
votes
2answers
1k views

How to download the latest file in a folder using a scp?

I'd like to run an scp transfer to download the latest (newest) file in a certain directory to my local directory. Something like this: source: root@rimmer.sk:/home/rimmer/backups/ destination: ...
1
vote
0answers
1k views

putty connection works but ssh command line refuses password authentication

I'm struggling quite a lot around ssh tunnels today. First, here is my configuration: My local machine, a PC with windows XP (ip=l.l.l.l) My remote server, with a CentOs 5 installed (ip=x.x.x.x) ...
1
vote
1answer
267 views

How to restrict an SSH tunnel to a certain outbound IP address on an SSH server?

I hope I'm phrasing this question correctly. I have a SSH server that I use for testing that has 2 internet connections running on it. The LAN connection is always on, but the USB connection is on ...
11
votes
1answer
4k views

Remote desktop over SSH reverse tunnel to replace TeamViewer

I want to open a remote desktop session from my laptop to desktop over my SSH (reverse) tunnel. That should be simple (or at least doable), right? Until now I've been using Team Viewer to log in to ...
3
votes
4answers
5k views

SSH not working from one specific computer

I can connect from every other computer on the LAN, as well as externally. It connects fine to other machines running SSHD. When trying ssh with verbosity, I get the following readout: $ ssh -vvv ...
4
votes
2answers
738 views

SSH tunnel through middleman server - how to connect in one step (using key pair)?

My question is basically how to turn my existing two steps into one step. I have a working SSH tunnel set up between two computers using a middleman server like this: ...
-1
votes
1answer
603 views

SSH key based login bypasses password policies

I noticed that logins via an SSH key bypass the LDAP password policies (password ageing, password warning, and password lockout due to failed attempts, etc). Is there any way to force key-based ssh ...
3
votes
1answer
1k views

How to validate an SSH public key?

I've had issues copying public keys to authorized_keys and winding up with an extra linefeed or space or something. Is there a way to simply validate that a key looks like a valid key? I don't have ...
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). ...
4
votes
3answers
131 views

Can I recursively print all current remote shells?

Is there a way to print out all of the local and remote shells I am currently in, recursively? For example, on my local machine, I will ssh into another machine. From there, I may switch users ...
3
votes
4answers
3k views

List of servers to check for SSH availability

I have a list of IP address that I need to SSH to and log if I could get to them. I would use a Ping script, but DNS might have already reassigned the address. I do not care about the ones I can't get ...
5
votes
7answers
365 views

Are there additional ways to protect SSH connections besides firewall and RSA Keys?

Sometimes I don't have a static IP and need to administrate my web server remotely. I'm looking for any additional layers of protection I could add to make opening port 22 safer. Currently I have ...
2
votes
1answer
270 views

vim and tmux are conflicting. How can I fix this? [duplicate]

I'm having a painful experience with tmux. I'm using solarized in vim but when I run tmux then my vim configuration does not work. It's as if solarized is not configured in my .vimrc. Out of tmux ...
2
votes
1answer
2k views

How can I create a shortcut to resize panes in a tmux window?

I am having lots of issues with tmux in mac. Another problem I have is that I can not bind a key in my tmux.conf to be able to resize my panes. What I need is the CTRL-b: resize-pane -U 10 I currently ...
3
votes
1answer
625 views

Public-Key Authentication w/ Jailed SFTP User

I'm trying to set up a jailed SFTP user account on my own local machine to test an application with libcurl. I used this guide to help me figure out how to set up a jailed SFTP user: ...
1
vote
1answer
3k views

iptables prevents connection via ssh after port change despite ACCEPT rule

I have two machines hooked up to a router, one Windows with PuTTY, and one CentOS 6.4 with sshd and with the default SELinux still enabled. They can both ping each other successfully. I installed ...