3
votes
3answers
49 views

Monitor all login attempts

Few weeks ago I thought it would be a good idea to write a script to send me an email whenever some user logs in into my server. So I came with a perfectly working script notifyLogin.sh, then I ...
8
votes
2answers
103 views

Weird SSH issue, ssh works with -t but freezes without it

When I ssh into one of my servers, it seems to log in, but then hangs before giving me the prompt (message debug2: shell request accepted on channel 0 is the last log entry). Though the odd thing is ...
1
vote
1answer
115 views

problem with unique ssh public/private key pair on second user

I have created an ssh key pair using ssh-keygen -t rsa for my main user and everything seems to be working well. Password login has been disabled. I have a second user that I am trying to create a ...
1
vote
1answer
47 views

su to another user using ssh keys?

Assuming that user_A and user_B set up and exchange public ssh keys with each other, is it possible for user_A to su into user_B on the same machine?
1
vote
2answers
40 views

How to log out of su and another user

So when I am logged in as a standard user in an ssh session and then su to root, how can I log out of both accounts with a single command? Rather than: root@host:/exit user@host:/exit something ...
2
votes
0answers
111 views

Autofs home directories with passwordless logins

I want a setup where a user home directory is mounted on login (autofs). This is working with password based authentication. However, I want passwordless authentication, by generating public keys. ...
3
votes
2answers
332 views

Linux SSH logging via PUTTY

I have Linux console, managed from Windows. Can login to Linux console from MSTSC service of Windows, as xrdp is installed on Linux. However I cannot login via Putty with SSH connection. It's ...
0
votes
1answer
62 views

Linux Fedora Core 18 freezes on OpenSSH login

miagos:~ $ uname -a Linux miagos 3.9.6-200.fc18.x86_64 #1 SMP Thu Jun 13 18:56:55 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux I have a reproducible issue, when my desktop Linux node stays online for more ...
1
vote
1answer
58 views

Ways of logging to Linux machine [closed]

How many ways to log to a Linux machine there are? Direct login, using connected keyboard :) Remote login via ssh (-Y) to console or GUI is there any other means - defaultly allowed, or enabled in ...
2
votes
1answer
156 views

Was my Unix server compromised?

Someone asked if this constituted a break-in and wondered if their server had been compromised. Jan 12 04:16:51 foo sshd[26725]: Failed password for root from 61.174.51.207 port 1076 ssh2 Jan 12 ...
1
vote
2answers
111 views

Wrong number of logged in users using “w”

There was a temporary network glitch and all user terminal ssh sessions were broken. Upon logging in to the CentOS server again and running the "w" command lists a higher number of users logged in ...
1
vote
3answers
1k views

Set environment variable automatically upon SSH login (no root access)

The situation: I run Ubuntu 12.04 LTS on a virtual machine. I regularly have to connect to my account on a university server, I do this by opening up terminal and using ssh -Y username@server.com. ...
1
vote
1answer
568 views

SSH alerts for outside IP addresses

So i have a script that emails me if a login is from anything besides an ip address that starts with "10.1.": #!/usr/bin/python import smtplib, os server = "10.10.10.10" From = ...
0
votes
0answers
37 views

SSH Login with key but without password with regular user on Synology Diskstation [duplicate]

For backup purposes I wan't to login to my Synology DS212j+ without using a password (but with a passwordless RSA key) and with a regular user (let's say the username is 'regularuser'). I've gotten ...
0
votes
5answers
2k views

SSH login attempts per minute per IP

How can i limit SSH login attempts per minute per IP ? I want to disable login attempts during 5 seconds after a failure. Is this possible ? I'm not talking about ban a user after parsing logs like ...
2
votes
3answers
153 views

Is there a way to maintain ssh-agent connectivity in different screens?

Whenever I use ssh-agent for passwordless logins it doesn't work across different logins and screen sessions, even if they are concurrent. I suspect it uses some shell variables that don't work ...
2
votes
3answers
259 views

Log in with specific shell at terminal login

If I log in to a system over ssh, I can use the default shell with a simple ssh user@host, or specify something like ssh user@host 'bash --norc --noprofile' or ssh user@host ksh. Is it possible to ...
5
votes
1answer
1k views

How many users does Linux support being logged in at the same time via SSH?

I know Linux supports multiple users being logged in at the same time. But what's the maximum number of users that can be logged into Linux at the same time? I see there are there are 69 tty files ...
0
votes
1answer
915 views

Unable to login to my server using ssh

Yesterday I was migrating to my new server, needed to use rsync, I created a RSA key, so that rsync could connect, I saw an error that says add to trusted key in location x I didn't have that location ...
2
votes
1answer
122 views

How to tell where recent ssh sessions originated from?

I know that sometimes when I login to systems they print out where the most recent ssh session originated from (usually an ip address or hostname). How can I lookup where some of the most recent ssh ...
5
votes
3answers
5k views

Disable user shell for security reasons

We have several user accounts that we create for automated tasks that require fine-grained permissions, such as file transfer across systems, monitoring, etc. How do we lock down these user accounts ...
9
votes
4answers
27k 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 wont have access to ...
12
votes
3answers
14k views

Which users are allowed to log in via SSH by default?

When I set up my Debian 6, I was wondering, which users apart from root whose password I know can log into my system via SSH? When I install Apache 2 a user called www-data gets created. Does this ...
2
votes
2answers
825 views

log remote X session from ssh (PuTTY)

I've googled alot about this and can't find a way to do this (or if it's even possible) I want to log a user on a remote machine in his X session (Gnome) from a ssh in a windows machine with PuTTY. ...
2
votes
1answer
421 views

Why am I not able to login directly using SSH

Suppose, the server address is abcd.com. On my local machine at my workplace, I have to login to that server, using ssh <my employeeid>@abcd.com Then, to login to user myname , I have to use ...
5
votes
4answers
6k 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 ...
0
votes
2answers
618 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 ...
5
votes
1answer
120 views

How can I log in my laptop with public key authentication?

Stemming from my recent aversion to passwords (this thread convinced me), I'm wondering if there's a way to login locally (on my laptop running Crunchbang/Debian) by using public-key encryption. I ...
1
vote
2answers
768 views

Running any kind of login script when sh is linked to bash

My problem: My web host offers ssh to their shared server. I want to set up a couple of aliases and such, so I'm trying to get a login script of any flavor to run. If my shell was plain bash, I would ...
2
votes
1answer
184 views

Why can I still log in via SSH (PAM Auth) while `shutdown -k` is active?

Pretty straight-forward. Does SSH ignore the nologin file created by shutdown -k TIME? Using PAM Auth to sync password database to users; if that makes a difference.
1
vote
2answers
5k views

How do I log out of all my active sessions?

For some reason, I have a few open sessions on an SSH server that I don't know about. I assume they're leftovers from when my pipe broke. $ users user1 user2 user3 me me me me Is there a way to log ...
5
votes
4answers
2k views

automatic passwordless ssh at login/restart

I want to have passwordless ssh to persist even after after I restart or logoff and then login. Somehow I have to run ssh-agent and use command ssh-add at login. I read here to add following lines to ...
3
votes
1answer
3k views

Can a user with /sbin/nologin shell login through ssh?

Is it possible to ssh to a machine as a user with no valid shell (say, mail)? So far I cannot, and using the command below doesn't work: $ ssh mail@machine.local /bin/bash It will always say "This ...
3
votes
1answer
11k views

How to enable remote login?

Currently I can only login to my remote linux via the "ubuntu" user account, without a password (via SSH authentication). I have another user configured on the machine, and if I try to login with its ...
10
votes
3answers
3k views

How can I make a user able to log in with ssh keys but not with a password?

I would like to create a user and have no password. As in you cant log in with a password. I want to add keys to its authorized_keys by using root. This is for my automated backup system.
8
votes
2answers
3k views

Creating a UNIX account which only executes one command

Is there a way to create a user account in Solaris which allows the users to run one command only? No login shell or anything else. I could possibly do it with /usr/bin/false in /etc/passwd and just ...