![]() On linux (and certainly on Mac but I don't know how to do it), you can mount an ssh remote location in Networks and use the connection as you use a local disk (this is sftp and the connection is in the form: and I guess this is what you need instead of a remote terminal connection so you can edit the file directly with the Mac application. If you haven’t set a passwordless SSH login to the remote machine, you will be asked to enter the user password. For example to copy a file named file.txt from a remote server with IP 10.10.0.2 run the following command. This above is if you need to access it in terminal. Copy a Local File to a Remote System with the scp Command. Obs: you don't need the initial ssh connection to use scp - it will create a new one The steps are as follows: 1) Add these 2 lines to your /.ssh/config. It needs 2 very small scripts (1 remote, 1 local) and 2 lines in your ssh config. To put file back, scp again switching the paths. It's a script that duplicates the current ssh connection, finds your working directory on the remote machine and copies back the file you specify to the local machine. Your server is on internet or in LAN, same subnet?Īnyways if you only need to edit a file, why don't you simply use scp to copy the file to your local machine? You can use ssh to browse for the file on the remote server and when you have its path, enter in your local machine (in another terminal): scp /local/path/to/save/file Is your local machine accessible from the server? Can you ping it? I'm asking that because what you are doing should work if your machine is accessible. I'm sure I must be missing something quite obvious here, but for the life of me I can't get a handle on it.Īny help, links or general nudging in the right direction would be greatly appreciated! So the above facts make me think that I am in the clear with regards to firewalls etc on the local and remote machines. If I try and SSH into another server (not my local machine) from my remote server, I can get connected up with no problems. If I try and SSH into my mac from another machine on out LAN I can connect no problems. I'm on a Mac(OS X 10.6.4) and I have Remote Login enabled in system preferences/sharing ![]() I am trying to discover where I should be calling by looking at the output of the $SSH_CLIENT variable, but I'm on a standard vanilla internet connection (no static ip address) I think this might be what is causing the problem. Hopefully that makes sense!Īt the moment if I SSH back to the local machine once I am logged in to the remote server, the terminal will just sit there whirring away, no errors even with -v. Basically I need to jump through these hoops to be able to browse the remote server and then send file information back to my local machine so it can be dealt with by an application on the local machine. Now the tricky bit, with the connection to the remote server established I want to then initiate a connection from the remote server BACK to the local machine. I want to establish a connection to a remote server from my Mac using SSH. Sorry if this is too vague, they're not prepared to take people through the basics of Unix, well transferring between computers like this anyway as I'm the only one that needs to do it due to not being able to access the Unix systems directly (partially sighted).I'm trying to do something rather unusual (for me anyway) with SSH and I can't get it to work, hopefully you can help. My laptop has an IP address from the wireless network I'm connect to.Ĭan anyone help me with this please? I'm sure it simple, basically copying from HOME where I'm logged in to HOME on my laptop but how do I specify the laptop? Is it just the IP/home as in 139.133.123.456/home? But if I open another cygwin window, I can't seem to access the Uni files in the other window. ![]() ![]() I'm not sure of the format to copy a file to my home directory on my cygwin, because home when I'm logged into the server is the home directory on the server. due to security, the only way I'm even able to access the files let alone do anything with them is to ssh in through cygwin which I've installed. I would like to copy the files in my home directories there to my laptop. we each have a login and password to access it. I'm sorry if I get on people's nerves asking this, but I don't really understand how to do this and unfortunately don't have the time to work through it step by step in books, etc.Īt University, we have a unix server that hosts our files.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |