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

learn more… | top users | synonyms

2
votes
1answer
20 views

Why do I get an error when double quoting single quotes in a script that launches a remote SSH command?

I have this script: port=$1 cmd=$2 ssh root@127.0.0.1 -p $port "'"$cmd"'" When running myscript.sh 1000 "ls /dev/shm" it get this error: bash: ls /dev/shm: No such file or directory In the ...
0
votes
1answer
36 views

Intermittent 'ssh_exchange_identification: Connection closed by remote host' error

While there are many questions on this site and others addressing this very issue, I haven't yet found one that seems to address what I'm experiencing. When trying to ssh a linux box from a MBpro ...
10
votes
3answers
706 views

scp between two servers not in the same network

There are two server that I can access with 2 different VPN connections. I have managed to have both VPN working on the same time on my machine (a bit of routing rules). I want to do a scp ...
2
votes
1answer
138 views

How can I change login while authenticating on SSH?

It's hard for me to express exactly what I mean, so I'll explain it in a few steps: I'm connecting with SSH, and server ask me for login. I write login, and then it asks me for password. I realize ...
1
vote
2answers
58 views

How to find md5sum of files on remote machines by doing ssh?

I am running my below shell script on machineC which gets the md5sum of my files in my PRIMARY directory in machineC itself. #!/bin/bash export PRIMARY=/data01/primary for entry in "$PRIMARY"/* do ...
1
vote
1answer
28 views

scripting copy of remote root-owned files when 'PermitRootLogin no'

I'm setting up a cloud node (only ssh-accessible, GUIs deprecated, running Debian 7) with 'PermitRootLogin no' for security. For some applications I want to copy some root-owned config files from the ...
0
votes
2answers
23 views

When executing a script via ssh, how can I transfer variables back to the PC issuing the cmd?

I'm writing a pretty simple script that will SSH into the machine of my choice, run a script to obtain things like the number of users logged in, CPU averages, etc, and write it to a file on the PC ...
1
vote
1answer
45 views

ssh as super user

I did the following mistake on a remote server : # sudo chmod 700 / Now no user but root can do anything. I can't even ssh as a normal user anymore, since I don't have permission to access bash. ...
-1
votes
3answers
82 views

SSH: “Server refused our key” with no reason

I was trying to set up a simple backup script to run automatically that would copy a file from a Windows machine to a Linux one through SSH. As a lot of simple online tutorials suggest I used pscp ...
7
votes
3answers
3k views

SSH: tunnel without shell on ssh server

I have to set up a tunnel between two hosts. For this i use ssh in this way: ssh -L MY_LOCAL_PORT:FOREIGN_ADDRESS:FOREIGN_PORT MYUSER@SSH_SERVER after that, I login into my SSH_SERVER. How can I ...
0
votes
1answer
21 views

ssh config change user for one host

I would like to connect to each server using the root user and to machin server using me user. I edit .ssh/config User root Host machin Hostname machin User me When I type ssh machin I ...
0
votes
2answers
30 views

Disable incoming telnet connections

I'm trying to secure my Debian server, and noticed that if I type telnet myserverip port# then anyone can see my ssh version. I'm a bit worried that people can do some harm aside from that. How can I ...
4
votes
3answers
43 views

SSH pipe broke while running apt upgrade. What can I do about it?

I was connected to my aws debian wheezy server and while running apt-get upgrade the ssh pipe broke. I didn't use screen or anything, so I don't think there's a way to recover that session. If I ...
6
votes
3answers
2k views

Remote-Accesible Live-Distribution (aka Live CD)

I'm looking for a live distribution (Live CD or the likes) which comes - per default - with sshd running at startup. I want to check the components of my laptop whose graphics has died ...
0
votes
1answer
37 views

How to take screenshot of /dev/pts?

I am connecting to another server using ssh service. I want to execute some commands (like creating users) on some servers and take the screenshot of the pseudo-terminal, which is to be stored on my ...
1
vote
1answer
24 views

How to check if SSH compression is enabled?

I am experiencing severe slowdown in Git checkouts from VM. I've been told that one of the reasons may be SSH compression (either enabled or disabled). How to check that is the state of compression ...
3
votes
2answers
500 views

ssh-add in not persistent between reboots

I add a ssh key to the agent by $ ssh-add ~/.ssh/id_rsa_mac Identity added: /Users/alex/.ssh/id_rsa_mac (/Users/alex/.ssh/id_rsa_mac) After reboot I don't have this key added anymore: $ ssh-add -l ...
0
votes
0answers
49 views

Password-less ssh authentication refuses to work [closed]

I have looked at the similar questions but none of them address my issue. I have a CentOS 7 VirtualBox guest running in a Windows 7 host PC. I'm trying to get password-less ssh to work since I must ...
1
vote
2answers
300 views

Remotely compile and run program using ssh and screen

I'm trying to compile and run a program remotely. However, I'd like to this within a screen and also I'd like to run this using grid engine on another node after I ssh. Currently I have: ssh ...
0
votes
1answer
32 views

Why is my server intermittently refusing ssh connections?

Background I have an ssh and OwnCloud server. Frequently, my desktop's OwnCloud client disconnects. Attempting to ssh into my server results in Connection refused. I can ping the server, but cannot ...
3
votes
2answers
133 views

running a program located on my computer on a server

There is a server I can SSH into , but I can't use up a lot of the HDD space on it. I want to run a program, but this program is quite large, so I can't just copy it to the server. Is there a way to ...
1
vote
2answers
91 views

Why can't I use public/private key authentication with ssh on Arch Linux?

I have the following setup on an Ubuntu machine: ~/dotfiles/authorized_keys2 ~/.ssh/authorized_keys2 -> /home/wayne/dotfiles/authorized_keys2 I had the same setup on my Arch machine, but when I ...
0
votes
1answer
63 views

How to ssh into remote machine and create new user in bash script

I am writing a bash script and would like to ssh into a remote machine and execute the adduser command. This is not working, all that I get is the --help text for adduser when I run the code below. ...
0
votes
2answers
708 views

Script SFTP with password - HP-UX

I would like create a script in HP-UX to send in sftp with password. I have this command sftp -o PasswordAuthentication= but if I answer yes or no after, I have this issue "Host key verification ...
1
vote
1answer
40 views

Change SSH connection settings without disconnecting?

I watched the The Black Magic Of SSH video and lecturer in this video drops to SSH shell with some key-combination. How did he do that?
28
votes
4answers
4k 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
45 views

How to send a mail when someone remote connects to my server

I would like my server to send a mail to me when someone connects remotely over ssh to my server. who only gives me back the Username, TerminalID and Date. I cannot use only that, I need to check ...
3
votes
0answers
118 views

“PTY allocation request failed on channel 0 stdin: is not a tty” when SSH'ing into a Debian server

My hosting space (Debian Wheezy) serves two websites (one WordPress and one Rails). Today I saw both were down and I rebooted the server. The Rails site works again and the WordPress one now says that ...
1
vote
0answers
65 views

How to pass multiple commands via pssh and multiple xterms

I'm attempting to open multiple xterms and run a command as an SAP user via sudo using pssh. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in the servers ...
0
votes
0answers
14 views

how to build a Public Access Unix server? [closed]

I have seen grex.org, and would like to create a public access Linux server. I know how to set up an ssh server, but What I want more detail on is how to allow new users to create accounts which i ...
2
votes
1answer
557 views

SSH agent forwarding, multiple hop

I tested this setup with Linux origin machine - everything is the same - only the first hop can use keys from origin machine. Initial problem I'm trying to set up SSH agent forwarding with multiple ...
0
votes
2answers
5k views

User denied ssh access while in AllowUsers list

I've inherited the administration of a linux box in my workplace; it was set up by a colleague who is now gone. Recently, I added a new user to the system, and tried to give her ssh access as well; ...
0
votes
2answers
35 views

SSH into Windows Server '08 from Mint 14 - “permission denied”

So I have been trying every which way to get into my Server '08 box via SSH. I have tried FreeSSHD and Cygwin. Everything works fine when I am using simple SHA pass authentication, but the moment I ...
1
vote
1answer
33 views

How do I troubleshoot ssh tunnels disconnection?

I am using SSH tunnels launched via autossh at boot on a device installed at remote locations. Up to now everything was working fine but yesterday the connection partly went down and autossh wouldn't ...
-1
votes
1answer
45 views

Connect via SSH with hostname instead of username and hostname

Whenever I have to login to a remote server, I have to enter ssh username@hostname and subsequently a password. I want to save time by omitting some parameters whenever I try to login to a server. I ...
1
vote
3answers
148 views

Can't ssh to a machine

All of a sudden, I couldn't ssh to a machine to which I used to ssh earlier. Consider I am ssh-ing from A to B. Output when I run ssh root@ip_addr_of_B I get: Permission denied ...
3
votes
3answers
2k 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 ...
0
votes
1answer
27 views

Binvox not working on a headless Linux server

I'm trying to run Binvox (http://www.cs.princeton.edu/~min/binvox/) via web server, on an Amazon EC2 server with Nvidia GRID K520 GPU and running Ubuntu 14.04. I'm using the system(binvox, $ret) ...
4
votes
1answer
56 views

Provide sftp read/write access to folder and subfolders, restrict all else

I need to provide user access to Ubuntu 14.04 Server, only limited to certain folder. To enjoy the ssh security and not to open up new service and ports (ie, ftp), I'd like to stick with sftp. ...
1
vote
1answer
22 views

Keychain SSH Key Manager prevents SFTP login on CentOS

I installed keychain and added this to my .bashrc in CentOs to help manage my SSH Keys: /usr/bin/keychain --clear $HOME/.ssh/id_rsa source $HOME/.keychain/$HOSTNAME-sh So on SSH login I am prompted ...
1
vote
0answers
8 views

How to SFTP through proxy if there is no netcat? [duplicate]

sftp -v -oProxyCommand="nc -v PROXY_IP_HERE PROXY_PORT_HERE %h %p" user@remote_sftp_server.com 22 How can I do this if I don't have netcat installed? I don't have permission to install it, even in ...
4
votes
0answers
64 views

Immortal SSH Session

I've got a little TurnKey Linux Debian Squeeze VM that I use for SFTP. I had a user login and transfer a file the other day and now I can't seem to kill the session. I'm still a little shaky in ...
3
votes
0answers
787 views

How to efficiently use Console2 with screen/tmux/byobu?

I'm using Console 2 and msysgit's bash to SSH into my Linux machines. There, I'm using screen (but considering tmux and/or byobu), but currently simply with one single-terminal session per ...
2
votes
4answers
8k views

X11 forwarding not working from putty and XMing to centos 6.4

I have centos 6.4 running on VirtualBox. I can connect to it via putty just fine. However X11 forwarding is not working. I Have Xming 6.9.0.31 running and putty 0.62 is setup for X11 forwarding: ...
1
vote
3answers
394 views

Different “history” command output after reconnecting via SSH

Why do I get different results for the "history" command for the same user after I reconnect a disconnected SSH session? I connect to a server using putty (SSH), say as root My network gets ...
0
votes
1answer
28 views

Howto Tell if a System authenticate with password only or through PAM

If my computer has the pam package installed and has the directory /etc/pam.d/sshd, does it mean for sure when I ssh to my computer, I am authenticated through pam modules? The /etc/pam.d/sshd looks ...
2
votes
3answers
45 views

Redirect SSH user server side

I know that I can create shortcuts for specific users/servers on the client side via ~/.ssh/config or /etc/ssh/ssh_config, but I would like to do something similar but on the server side. That is, ...
0
votes
0answers
27 views

How do I stop PuTTY becoming unresponsive to input when displaying large amounts of text? [migrated]

I use a windows 7 machine to ssh into a remote Linux machine using PuTTY 0.62. When I accidentally forget to stream the output to a file and run a program that prints a lot of data to the screen I ...
15
votes
4answers
14k views

How can I tell what version of linux I'm using?

Often times I will ssh into a new client's box to make changes to their website configuration without knowing much about the server configuration. I have seen a few ways to get information about the ...
0
votes
1answer
192 views

Cant ssh, connection terminates immediately with exit status 254

The most recent thing I remember is changing the soft and hard memlock ulimit to unlimited. Now I cant ssh into the machine. This is the ssh log. Authenticated to IP ([IP]:22). debug1: channel 0: ...