Tag Info

New answers tagged

1

You'd need to setup a ChrootDirectory directory in sshd_config Detailed instructions for ArchLinux are available at SFTP chroot. The basic outline is as follows: 1) Add chroot configuration to sshd_confg such as: Match User username ChrootDirectory /home/%u ForceCommand internal-sftp 2) Change chroot directory rights with something like: chown ...


0

Not sure to really understand your situation. But three things are on my mind. First, if all your computers are behind a router on the same network, nothing will be blocked (router block ports from outside, not inside). Second, if you can SSH and your application is using the port 3333, maybe your SSH server is not listening to the port 3333. SSH use ...


0

You should use netcat, it is a Linux command line utility that will allow to create a server or client on the fly on the remote machine and create the corresponding server or client on your machine, then you send messages from one end and if it is received on the other end then the port is open. ...


0

This is the top google result for this question, so I will put my answer here. I stayed up all night filtering the results, and came up with a long complex command that shows you only your reverse ssh tunnels in this format: publicipaddress:remoteforwardedport Here is the code, I am running Ubuntu Server 12. I am running reverse ssh tunnels that forward ...


3

In layman terms, Secure Shell or SSH is established between two computer programs : On the server side : A daemon (system service) that listens on a TCP/IP port and accepts connections. It receives encrypted packages of several types, which it executes. On the client side : A client which connects to the server and transfers commands. The connection ...


0

The new user template already exists in /etc/skel; copy the file into there and any new users will get a copy of that file in their home directory.


4

If you go into the Putty Configuration screen, under the "Terminals" category, in the "Features" tab, there is a checkbox for "Disable switching to alternate terminal screen". Make sure to check it, and you'll get exactly the behavior you're looking for. From the Putty Documentation: 4.6.4 Disabling switching to the alternate screen Many ...


2

Use TERM=vt100 to leave the content on the screen after exit. You can simply test by doing export TERM=vt100 if using bash. No need to restart the shell. You can set this value in Putty as well, as part of the configuration for that connection.


1

Let's say you are on Computer A and you connect to Computer B, so A initiates a connection to B.. Say it's web, so HTTP connection. There's no Proxy there and no Encryption. No SSH, no SSH command used. You could run that connection through SSH, that'd involve tunneling and port forwarding and would of course gain the benefit of encryption too, but ...


0

Does the Mac you want to ssh into have sshd turned on and the right user permissions? under system preferences> sharing > turn on remote login and remote management and then select the users you want to allow to ssh into the machine. if yes, tail the /var/log/system.log to get more info


0

For me I needed GSSAPI, and I didn't want to turn off reverse DNS lookups. That just didn't seem like a good idea, so I checked out the main page for resolv.conf. It turns out that a firewall between me and the servers I was SSHing to, was interfering with DNS requests, because they weren't in a form that the firewall expected. In the end, all I needed to ...


0

Need some clarifications, I'm not sure I understand what you're trying to do. What I understood from your post was that You have 2 users : "admin" and "b" You refer to "admin" as "A" in your question You want to be able to connect to the admin account, using ssh, from the b account So the command you are trying to run is this one? [b@computer]$ ssh ...


0

How about passing -s /bin/bash to su?


1

A secure way to connect to your computer through SSH is to use public key encryption, see here for an example of how to set it up. Public key encryption sets up a public/private key for you to use to connect to a server without having to enter a password each time you connect. It is more secure than just username/password, although a username/password ...


1

Your error message "Can't open display: 192.168.0.76:0.0" doesn't sound like SSH X11 forwarding is in use. Instead, programs on the remote host are trying to connect directly to C1, which won't work for quite a few reasons (Xorg does not listen for TCP connections by default; your firewall blocks them; the Xauth data was not sent correctly...) If X11 ...


0

Most likely - In the putty config for C1, did you check "Enable X Forwarding" (under Connection->SSH->X11). Also, is the DISPLAY environmental variable set on C1?


0

I too have found the same problem with the same router from Comcast. It seems to be a total piece of junk as when you enable a DMZ host instead the SSH port works fine. When just forwarding the SSH port it fails about 99% of the time (every once in a while it works anyway). Best bet is getting your provider to put the router into bridge mode and using ANY ...


0

Thank you very much! So, I have: Created public and private keys with PuttyGen (SSH-2 RSA, 4096 bits and added a passphrase); Uploaded public key on server (before for sudo user and then for root); Changed number of port; PermitRootLogin no, PubkeyAuthentication yes, PasswordAuthentication no. In this way: If I try to login as root or sudo user and I ...


1

you can change the color configuration here: settings -> configuration -> terminal Then select a color scheme, for example "Bright". You can click in each of the color and change it as you want.


0

Lots of different (separate) questions here... Practical Considerations To use the same keypair for multiple users, you can simply copy the contents (some, or all) of ~/.ssh/authorized_keys into another user's ${HOME}/.ssh/authorized_keys file. You'll need to make sure permissions on the .ssh directory and authorized_keys file are sufficiently tight or the ...


0

To have authentication for multiple users, just add the public SSH key to both the normal user's ~/.ssh/authorized_keys file and to root's ~/.ssh/authorized_keys file. Then you can select which account to log on to by choosing the username in your client program. It used to general best practice to disable root login entirely and always use a normal user to ...


0

In addition to iptables, you also need to use the -g option with ssh (GatewayPorts) and the server's config /etc/ssh/sshd_config has to have the GatewayPorts yes set.


2

Let's define the environment: You are at a machine that I call home. You have SSH access to a machine in the university, I'll call it univ. univ's MAC address is white-listed, so it has access to that privileged network. So, yes, you can easily create an SSH tunnel: you@home$ ssh -D 1234 you@univ This will create a SOCKS proxy listening to home port ...


0

This seems like a way to get your 'friend' in trouble. The sysadmin can almost certainly see the existence of communication between the privileged host, and other systems within the network. The sysadmin can also probably see outgoing communication from the privileged host to the rest of the world. So even if he doesn't see your SSH session, he may ...


1

If openssh refuses to read the file, you could use openssl openssl rsa -in ~/.ssh/id_rsa -pubout -out ~/.ssh/id_rsa.pub Nevertheless, you won't be able to use any of them until you correct your permissions. ~ must be 775 at most, ~/.ssh 700, ~/.ssh/id_rsa 600


3

SSH tunneling is the same as port forwarding in this context, though SSH documentation and configuration parameters usually refers as the later one. Tunneling or forwarding a port allows you to encapsulate TCP traffic inside a SSH connection. This could be used to encrypt traffic using the SSH connection. connect to any machine on the other side of the ...


0

The guide for your model (http://www.cisco.com/web/consumer/support/userguides2/4021196_B.pdf) does not appear to indicate that your router supports command-line management. It appears to be done from the Web Interface only.


0

No, when you close the SSH session, it will terminate all non-forked processes, including bash (your shell) and the php processor. If you want your programs to continue running when you disconnect, I recommend tmux or screen. These will start a forked session server which won't die when the client disconnects, and will additionally allow you to reconnect ...


0

This solution helped me: cd ~/.ssh chmod 600 *


1

This solution helped me: cd ~/.ssh chmod 600 *


-2

eval `ssh-agent -s` Then try to ssh into the EC2


0

Install: libpam-script Add to /etc/pam.d/sshd the following: auth optional pam_script.so Edit /usr/share/libpam-script/pam_script_auth and make it this: #!/bin/bash adduser $PAM_USER --disabled-password --quiet --gecos "" Make it +x via: chmod +x /usr/share/libpam-script/pam_script_auth Be happy.


1

Try looking into controlmaster. It opens a single ssh connection, and allows future ssh and scp connections to go through the same connection, so there is no need to provide the password again, or wait for the connection to open. Here is an example of how to setup controlmaster. Edit your .ssh/config file to include the lines: Host hostname ...


0

It's ever easier in Mercurial for single user (with shell-access to repo): just read Shared SSH wiki-page and Creating Repositories Over SSH tip and have remote SSH-repository Just one note: in Mercurial world ssh://hostname/path/to/repo and ssh://hostname//path/to/repo give you access to repositories in very different locations


0

I landed on this question after searching for a solution for the exact same symptoms (e.g. runas does not provide any output whatsoever, not even runas /?), but from a plain cygwin terminal window. I also found this answer which suggests running $ cygstart --action=runas command and for me that did provide a successfull outcome.


0

Check if the Folder: C:\Windows\System32\config\systemprofile.VirtualBox exists. If this folder inherits only logfiles - delete the whole folder or move it to a new position Now Link the correct folder to this position from a commandline (yes its possible with ntfs): mklink /j C:\Windows\System32\config\systemprofile.VirtualBox ...


1

PuTTY is a SSH client, and the public key given to you is specifically for authenticating against a SSH server. So you don't register the key with an OS; you register it with the SSH server. On Linux, ~/.ssh/authorized_keys is read by the OpenSSH service – but on Windows, you don't have a SSH server at all and will have to install one. Either Bitvise ...


1

Yes screen is your friend! If you need X11 i suggest to use VNC.


0

If you have ssh access on the server, you could always use an sftp client like ExpanDrive to mount your remote home directory on your local machine. Then you can just write your script locally in a text editor and save it to the locally-mounted remote machine. At that point, it'll be on the server, and all you have to do is ssh into it and run it. As long ...


1

For those who use a private key with their ssh and want to use the ~/.ssh/config method you can add an 'IdentityFile' attribute to your host followed with the key path. I.e: Host SomeServer User ubuntu HostName someserver.com IdentityFile ~/.ssh/private.key I would've added this bit as a comment to one of the answers, but my reputation is ...


0

Just to make sure I have this correct, You can use your key with a putty client but can't with an openssh client? openssh doesn't know what to do with a .ppk file (Putty Private Key) so you need to convert it using the program puttygen. You can download it here http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Alternatively, you can just ...


2

Putty keys are in a different format than OpenSSH keys. To convert them and use for cygwin/linux/cygwin-like shells like badun (which are likely to use OpenSSH), you will need to use puttygen: Open PuttyGen Click Load Load your private key Go to Conversions->Export OpenSSH and export your private key Using the exported key, rather than the ppk will ...


0

My network drives are painfully slow at work, so I made a CRON job which executes rsync -triv --delete to periodically synchronize the files in the background. You should time the rsync job a few times to determine a suitable interval so that you don't end up with multiple rsyncs piling up trying to copy at the same time. If you have to have ...


1

After a little more digging I found that OSx comes with screen installed. Full details on how to use screen are available at https://www.linode.com/docs/networking/ssh/using-gnu-screen-to-manage-persistent-terminal-sessions It's awesome!


0

Make sure you are using the same version of Pageant and psftp. Some versions are not compatible. If this does not help, run psftp -v and try again and include console output to your question. Ideally you should see something like: Pageant is running. Requesting keys. Pageant has 2 SSH-2 keys


0

Use two private keys Set up H2 using the same process (but not the same private key) as you did when you set up H1: There is never a good reason to copy a private key from some other machine. If you haven't already generated a fresh private key on H2, do so now. Also generate the corresponding public key. In a terminal on H2, type: ssh-keygen -t rsa ...


0

If pageant is running and has the key loaded psftp should use it. It does on my system. Exactly how does it fail for you? plink should use pageant the same way; does it work? How about putty user@host (not using a saved session)? According to the manual http://the.earth.li/~sgtatham/putty/0.63/htmldoc/Chapter6.html#psftp-pubkey option -i or a saved session ...


1

It seems to me that there are two ways of approaching this: Focusing on getting your command to run in the correct directory. For that, I would suggest the -i flag to sudo, which will set things up to be an environment as though you'd logged in as that user, so: ssh domain.com sudo -iu user ls Focus on solving the quoting issue, so that your quoted ...


1

From the bash manual: Here Documents The format of here-documents is: <<[-]word here-document delimiter [...] If any characters in word are quoted, the delimiter is the result of quote removal on word, and the lines in the here-document are not expanded. If word is unquoted, all lines of the here-document are subjected to ...


1

Ok, @Zoredache's advise was the one that helped the most here: when you issue ssh domain.com sudo -u user bash -c "cd /home/user/ && ls" from the source host, on the destination host this is actually run sudo -u user bash -c cd /home/user/ && ls which translates into sudo -u user bash -c cd /root as a cd without an argument ...



Top 50 recent answers are included