Hot answers tagged

6

You can't. What you ask is impossible in SSH. It's possible in HTTP, because HTTP/1.1 sends a Host header to tell the server which (virtual) host to connect to. SSH sends no such field. You can see this using the Wireshark network protocol dissector. If it was possible to do this, obviously it wouldn't provide any additional security. Please briefly ...


4

The venerable Gnu Screen can do what you want, but it can't attach to an already running gnome-terminal. You'll need to start screen at work if you want to pick it up later at home. See Session Management specifically.


2

pssh makes this much easier, but for your simple use case ssh will also work. While what you have above could have worked, provided the server is set up to run a command and exit on login (which is somewhat unlikely) you probably meant something like this: ssh $i <command> | grep tsm | ... If you really need to check a login banner for tsm, try ...


2

You have got some wrong record in /etc/ssh/ssh_known_hosts as the log proposes. How did you set up that one? It is system wide alternative to ~/.ssh/known_hosts and should be used only in reasonable situations (distribution, local network, certificates). Check what is in that file, check for some inconsistencies and possibly if there is your server1 or ip ...


2

It is always good to ask question. Next 30 second I found the solution, after 2 hours of searching... The difference was in /etc/ssh/ssh_config, not sshd_config This should be set to yes. Host * # ForwardAgent no ForwardAgent yes


2

You need SSH_AUTH_SOCK in the environment of your script. This can be done by executing declare -p SSH_AUTH_SOCK >~/.ssh-env as part of your login process. The script then has to source this file before it executes ssh-add: . ~/.ssh-env


1

Use netstat -tnp to find the process PID that is talking to port 25 on remote servers. Use ps and look at /proc/PID/cmd and /proc/PID/exe . Check the server logs (eg apache error log) for strange output like that of a wget command. Likely a PHP or other CGI has a security hole that needs to be fixed. If this is a shared server possibly someone has a ...


1

bring key from windows to unix from private key on windows, generate public key, copy both to unix2. if using putty, use puttygen, then conversion, export openssh key private key look like: (RSA being the type of key) -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCUAEAzrtuUOEMAN1vaX1GFBLoBiDba/AiIdfFkTFJeZtaKtiuIpS7 (...) ----END RSA PRIVATE KEY----- ...


1

The rssh manpage indicates it should be the login shell of these users: The system administrator should install the shell on the restricted system. Then the password file entry of any user for whom it is desireable to provide restricted access should be edited, such that their shell is rssh. For example: ...


1

The kernel will keep track of your connection, and there's not much you can do about it. I'm not even sure root privileges will help you here (at least not without some kernel module magic). If you want to hide where you're going, the best way is probably to pretend you're going somewhere else instead. In other words : use a proxy or anything which could ...


1

netstat and lsof or fuser are typical programs to view what ports are opened by what (though may require root or such access, depending, and vary by flavour of unix). A shared destination port is fine. It may help to work through e.g. Beej's guide to networking to understand the system calls involved. If the client has not connected, then any ports it ...


1

On a Linux client, you may view listening ports with netstat -lnp |less. Within an ssh session, you can press enter twice, then type ~#. That will list the currently forwarded ports for that session.


1

On your home computer, before starting the job, launch =screen=: screen Then, from work or where ever, ssh into your home machine. Once in a shell, connect to the screen instance running there: screen -raAd That's -r[eattach] -a[ll capabilities] -A[dapt the size of the screen] -d[etach screen if running elsewhere] Do whatever you want to do in that ...


1

Connection persistence Having persistent connection requires support on the server side. This is not available in current openssh server(and does not look like it will be). The client part was implemented years ago, the famous UseRoaming feature, that was dropped weeks ago from openssh. The feature never worked and was one big security vulnerability. It ...


1

I think what you are looking for is something like grep -vf safe_websites inputfile -v to invert the matches you already know, and -f is to obtain patterns from the file safe_websites.


1

You're more than likely running into a snag on the permissions. I usually leave authorized_keys to be 400 (though 640 will suffice). ~/.ssh should be 700. id_rsa I keep 400 as well. The less permissions the files have, the more ssh will be fine with them. If you use the -v switch on ssh, it will tell you this issue. /var/log/secure will also tell you ...



Only top voted, non community-wiki answers of a minimum length are eligible