I forgot the SSH password to this server. Luckily, I’m using the same account for SFTP which is stored in FileZilla. Here’s the steps I went through to retrieve the password.
- STEP 1: Export FileZilla’s configuration.
Click File -> ExportSave it as sites.xml
- STEP 2: Open sites.xml in an editor
If it looks like below, jump to STEP 4
<Server> <Host>server.net</Host> <Port>21</Port> <Protocol>1</Protocol> <Type>0</Type> <User>root</User> <Pass encoding="base64">WXNjMDY5N3FDZA==</Pass> <Logontype>1</Logontype> <EncodingType>Auto</EncodingType> <BypassProxy>0</BypassProxy> <Name>myserver</Name> <LocalDir>D:\projects\sodeve\var\www\sodeve\wp-content\themes\custom-v2\</LocalDir> <RemoteDir>1 0 3 var 3 www 6 sodeve 10 wp-content 6 themes 10 custom-v2</RemoteDir> <SyncBrowsing>1</SyncBrowsing> <DirectoryComparison>0</DirectoryComparison> </Server>
If it looks like below, continue to STEP 3.
<Server> <Host>server.net</Host> <Port>21</Port> <Protocol>1</Protocol> <Type>0</Type> <User>root</User> <Pass encoding="crypt" pubkey="rQU6B7W6yCF6AD6jpWaS71KQ9ygp0hRIdUYwzukKkQ4mnrz">y6HBTe/xhhN2pttv5P5kRH1sSp5vflAv/MB1zXbagmIpmGVxLQ36UzuLEl74b4/TwDYHKlEgZDKnD1o3JLKVemQrFgSxNf5mzpAW7C5Xzl7hgExIS0g+k</Pass> <Logontype>1</Logontype> <EncodingType>Auto</EncodingType> <BypassProxy>0</BypassProxy> <Name>myserver</Name> <LocalDir>D:\projects\sodeve\var\www\sodeve\wp-content\themes\custom-v2\</LocalDir> <RemoteDir>1 0 3 var 3 www 6 sodeve 10 wp-content 6 themes 10 custom-v2</RemoteDir> <SyncBrowsing>1</SyncBrowsing> <DirectoryComparison>0</DirectoryComparison> </Server>
Click Edit -> Settings -> Passwords
Select Save passwords instead of Save passwords protected by a master password
Click OK, enter the master password. Now return to STEP 1
To decode the password, you can either use base64decode.org, or you can use below program
Just in case someone naughty and messed up the code, below is the code:
using System; using System.Text; public class Program { public static void Main() { byte[] data = Convert.FromBase64String("WXNjMDY5N3FDZA=="); //Enter the base64 string here string decodedString = Encoding.UTF8.GetString(data); Console.WriteLine(decodedString); } }
By now, you should be able to retrieve the password. I hope it helps. Cheers!
loading...
About Hardono
Incoming Search
c#, filezilla, password